Score:1

GCC package requires a package which is not for my PC architecture

kh flag

When I try

sudo apt install gcc

it gives

The following packages have unmet dependencies:
 libatomic1 : Depends: gcc-12-base (= 12-20220319-1ubuntu1) but 12.1.0-2ubuntu1~22.04 is to be installed
 libcc1-0 : Depends: gcc-12-base (= 12-20220319-1ubuntu1) but 12.1.0-2ubuntu1~22.04 is to be installed
 libitm1 : Depends: gcc-12-base (= 12-20220319-1ubuntu1) but 12.1.0-2ubuntu1~22.04 is to be installed
 liblsan0 : Depends: gcc-12-base (= 12-20220319-1ubuntu1) but 12.1.0-2ubuntu1~22.04 is to be installed
 libquadmath0 : Depends: gcc-12-base (= 12-20220319-1ubuntu1) but 12.1.0-2ubuntu1~22.04 is to be installed
 libubsan1 : Depends: gcc-12-base (= 12-20220319-1ubuntu1) but 12.1.0-2ubuntu1~22.04 is to be installed
E: Unable to correct problems, you have held broken packages.

So, I have 12.1.0-2ubuntu1~22.04 while gcc requires 12-20220319-1ubuntu1. When I try to update gcc-12-base it says

gcc-12-base is already the newest version (12.1.0-2ubuntu1~22.04).

I have searched gcc-12-base package at packages.ubuntu.com and found this. My PC's architecture is AMD64 and the version which gcc package requires is not for AMD64. What should I do?

Output of sudo apt update:

Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.

Output of sudo apt 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.

I tried sudo aptitude why-not gcc which outputs

i   libdpkg-perl Suggests   gcc | c-compiler          
p   gcc          Suggests   flex                      
p   flex:i386    Provides   flex                      
p   flex:i386    Recommends gcc:i386 | c-compiler:i386
p   gcc:i386     Conflicts  gcc
Nmath avatar
ng flag
How is it that your system only has one line for sources? What happened to the other sources? Did you add 32-bit architecture to your PC at some point?
cc flag
The default gcc is 11, so why did the 12 get picked up? Have you enabled the Developer Options for Jammy Proposed?
Şirin Əhmədov avatar
kh flag
@ubfan1 no, I haven't
nobody avatar
gh flag
`apt-cache policy gcc` please.
Şirin Əhmədov avatar
kh flag
gcc: Installed: (none) Candidate: 4:11.2.0-1ubuntu1 Version table: 4:11.2.0-1ubuntu1 500 500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
nobody avatar
gh flag
Restore your Ubuntu package sources please. Search for this here l'm on mobile.
I sit in a Tesla and translated this thread with Ai:

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.