[Discuss] Ubuntu 22.04 apt-get problem

BCLUG info at bclug.ca
Sun Mar 26 11:20:35 PDT 2023


bctill wrote on 2023-03-25 14:30:

> I'm trying to install the g++ compiler on Ubuntu 22.04.1 LTS, and I get 
> the following:
> 
> $ sudo apt-get install g++
> 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 resolve 
> the situation:
> 
> The following packages have unmet dependencies:
>   libc6-dev : Depends: libc6 (= 2.35-0ubuntu3) but 2.35-0ubuntu3.1 is to 
> be installed
> E: Unable to correct problems, you have held broken packages.



Installing g++ wants to upgrade your version of libc6 2.35 by a minor 
build number.


I'm running 22.04 (but... a KDEneon version, so not pure Ubuntu). Looks 
like g++ has been installed, so when I tested it I could not recreate 
the problem.


Try:

apt dist-upgrade
apt-policy libc6 libc6-dev g++


The apt-policy helps inspect versions installed vs available.

Also, see `man apt-permissions` for syntax and semantics of apt search 
patterns.

i.e. `apt list ?broken` to see if any existing packages are "broken".


In this case, it may be worth doing the --force as Peter suggested 
(depends on how much it would hurt if the installation gets broken).



Quite an interesting situation - keep us updated!

rb


-- 
To subscribe, send an email to discuss-subscribe at lists.bclug.ca
-- 
https://bclug.ca
-- 
List Web site: https://lists.bclug.ca/mailman/listinfo/discuss



More information about the Discuss mailing list