Score:0

unmet dependencies because newer version to be installed

dj flag

I have encountered this issue in the last week (on both an old installation and fresh install) where when trying to install new packages I get dependency errors because a newer version than required is to be installed.

Here is one example of the error message when this is happening (but not limited to this specific case):

 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: 

  g++-11 : Depends: gcc-11-base (= 11.2.0-19ubuntu1) but 11.3.0-1ubuntu1~22.04 is to be installed
 Depends: gcc-11 (= 11.2.0-19ubuntu1) but 11.3.0-1ubuntu1~22.04 is to be installed
 Depends: libstdc++-11-dev (= 11.2.0-19ubuntu1) but it is not going to be installed 

 E: Unable to correct problems, you have held
 broken packages.

It feels like I got some update through that updated things beyond whatever the dependency map thinks things should be, but I really am not sure how I ended up with this issue.

Edit to add: Checking apt-cach policy may give a clue, but I don't know how to act on this information:

$ apt-cache policy gcc-11 gcc-11-base python3

    gcc-11:
      Installed: 11.3.0-1ubuntu1~22.04
      Candidate: 11.3.0-1ubuntu1~22.04
      Version table:
     *** 11.3.0-1ubuntu1~22.04 100
            100 /var/lib/dpkg/status
         11.2.0-19ubuntu1 500
            500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
    gcc-11-base:
      Installed: 11.3.0-1ubuntu1~22.04
      Candidate: 11.3.0-1ubuntu1~22.04
      Version table:
     *** 11.3.0-1ubuntu1~22.04 100
            100 /var/lib/dpkg/status
         11.2.0-19ubuntu1 500
            500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
    python3:
      Installed: 3.10.6-1~22.04
      Candidate: 3.10.6-1~22.04
      Version table:
     *** 3.10.6-1~22.04 500
            500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
            100 /var/lib/dpkg/status
         3.10.4-0ubuntu2 500
            500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
user535733 avatar
cn flag
Package `gcc-11-base`, version `11.3.0-1ubuntu1~22.04` suggests that you have (or had) the "jammy-proposed" repository enabled. Did you?
uwspin avatar
dj flag
"jammy-proposed" is not currently enabled, and I don't remember having had it selected, but if that's the case it must have been. Is there a way to roll things back to the latest official release?
user535733 avatar
cn flag
Not as a group. You can roll back individual packages by specifying versions: `sudo apt install packageABC=1.2.3.4`. Or you can just wait a week or two for the -proposed packages to migrate into jammy-updates, and the problem will magically resolve itself without any action by you.
uwspin avatar
dj flag
Thank you for the response. Unfortunately attempting to install a previous version is frequently leading to [the system thinking very important packages are no longer necessary](https://askubuntu.com/questions/1433961/install-of-i386-libraries-promting-removal-of-important-packages). Not quite sure how I got into this mess (that issue came up before the jammy-proposed snuck in there) but feels like I might need to reinstall again.
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.