-4

When I roll a brand new LXC CT with Ubuntu 21.04, I can't install software-properties-common which is required for apt-add-repository.

On a brand new instance I login as root and run apt update and apt upgrade, then apt install software-properties-common but get this output:

root@kubernetes:~# apt install software-properties-common
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies: software-properties-common : Depends: packagekit but it is not installable E: Unable to correct problems, you have held broken packages.

root@kubernetes:~# apt install packagekit Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: libglib2.0-bin : Depends: libglib2.0-0 (= 2.68.1-1~ubuntu21.04.1) but 2.68.0-1 is to be installed E: Unable to correct problems, you have held broken packages.

Any idea why I can't install this on a brand new instance? Seems kind of messed up.

automaton
  • 115

1 Answers1

-4

Well for anyone else having this problem the solution was to edit /etc/apt/sources.list and the following into it as the only item (comment out everything else):

deb http://archive.ubuntu.com/ubuntu/ hirsute-proposed main

Then run apt update and apt upgrade again to fix libglib2.0-0 package, then restore sources.list back to before (but leave the proposed line) and it will work when trying to install software-properties-common again.

Why you have to do this for a stock installation is really confusing and a terrible user experience.

automaton
  • 115
  • Very strange idea. You have to understand the current list of repositories. Using proposed is not recommended for end users. Check https://pastebin.com/x6YPa21B for understanding. Such Dockerfile works out the box. – N0rbert May 25 '21 at 19:15