[Discuss] Ubuntu 22.04 apt-get problem

bctill bctill at ece.uvic.ca
Sun Mar 26 12:23:23 PDT 2023


Hi BCLUG --

Thanks for your suggestions.  Here's what happens when I try them:

$ sudo apt-policy libc6 libc6-dev g++
sudo: apt-policy: command not found

$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ man apt-permissions
No manual entry for apt-permissions

The results from sudo apt-get install g++ have not changed.

Regards,
-- Bernie.


On 2023-03-26 11:20, BCLUG wrote:
> 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



More information about the Discuss mailing list