Score:1

Some packages cannot be installed from Live Ubuntu USB installation

uz flag

I have created an Live Ubuntu Desktop 20.04.3 LTS USB and booted into Ubuntu. I am confused over the fact that some packages cannot be apt-installed, such as llvm and tk-dev. I have previously installed these just fine in a regular Ubuntu 20.04.x installation and can't figure out why I cannot do it in this live boot installation.

Immediately after having logged into Ubuntu Desktop, I executed the following:

$ sudo apt update
$ sudo apt upgrade

Output of these commands can be found in this gist.

Then I am trying to install llvm:

$ sudo apt-get install llvm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package llvm

What's strange here is that llvm is present in the official Ubuntu Focal Apt repository: see https://packages.ubuntu.com/focal/llvm and http://archive.ubuntu.com/ubuntu/dists/focal/universe/binary-amd64/ . Same for tk-dev.

When I search for llvm it clearly is not found:

$ sudo apt-cache search llvm
libllvm10 - Modular compiler and toolchain technologies, runtime library
libllvm9 - Modular compiler and toolchain technologies, runtime library
libclang-11-dev - Clang library - Development package
libclang-common-11-dev - Clang library - Common development package
libclang-cpp11 - C++ interface to the Clang library
libclang-cpp11-dev - C++ interface to the Clang library
libclang1-11 - C interface to the Clang library
libllvm-11-ocaml-dev - Modular compiler and toolchain technologies, OCaml bindings
libllvm11 - Modular compiler and toolchain technologies, runtime library
libllvm12 - Modular compiler and toolchain technologies, runtime library

Can someone help shed light on what is going on here, and why I cannot find e.g. the llvm and tk-dev packages?

OS details:

$ uname -a
Linux ubuntu 5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:    20.04
Codename:   focal

$ wmctrl -m
Name: GNOME Shell
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: OFF
fredrik avatar
uz flag
I've added a link to a gist with the command output as well as some OS details. I am suspecting that the "universe" repo is missing. Once I add that, I can actually find the `llvm` and `tk-dev` packages!
fredrik avatar
uz flag
It's definitively Ubuntu I am running :) Installed onto USB using ISO from here: https://ubuntu.com/download/desktop However, I might be outdated on saying "Unity", as I just thought this was the window manager of the vanilla Ubuntu Desktop.
fredrik avatar
uz flag
I was just completely out of touch with the modern times... it's vanilla Ubuntu with GNOME. I've edited the question and added the output of `wmctrl -m` which says GNOME shell.
C.S.Cameron avatar
cn flag
How big is the USB? how did you make it? I have problems upgrading a Persistent USB, The kernel can not be upgraded. Smaller drives get the persistence file/partition filled quickly and stop working. Perhaps try doing an update and not an upgrade.
fredrik avatar
uz flag
@C.S.Cameron this was not a persistent USB. But I actually just created one using a 16 GB USB stick without issues. I followed this guide: https://www.howtogeek.com/howto/14912/create-a-persistent-bootable-ubuntu-usb-flash-drive/
fredrik avatar
uz flag
@guiverc well, I know how to add that (see my own answer). The real answer was the fact that the universe repo was not added by default in the live USB installation and that these packages reside on it. Then the solution of course is to add that repo (again, see my own answer).
guiverc avatar
cn flag
Ubuntu install media (desktop, server & cloud) provide only packages found in `main` repository (and some multiverse/restricted which are binaries only or closed-source). The `universe` repository is the Community sourced packages, ie. those provided by *flavors* so flavors have it enabled - but main Ubuntu shouldn't have it enabled by default (for LTS releases; everything on media has 5 years of support; that doesn't apply to packages found in 'universe' though with some 9 months, most 3 years.. ie. Ubuntu media skips this complexity by excluding it; letting users add it if they need to)
guiverc avatar
cn flag
Well done for solving it yourself though -- I was *stuck* on the Unity desktop (they provide 'universe' by default as use community packages)
Score:2
uz flag

It seems the "universe" repository is not added in the live USB installation of Ubuntu Desktop 20.04.3 LTS.

This seems to be the remedy:

sudo add-apt-repository universe

I can then install llvm and tk-dev:

sudo apt-get install llvm tk-dev

I would argue and say this answer is related and expands further on Canonical's repositories for Ubuntu: https://askubuntu.com/a/481355/449762

C.S.Cameron avatar
cn flag
Ah, yes. You need to add the Universe repository to install quite a few apps, such as mkusb, which was used to make your USB. +1 for letting us know your solution. I still would not do an upgrade, it just about doubles the number of files on your USB. Take a look using Disks and see how much persistence space has now been used.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.