Latest ubuntu22.04 The following packages have unmet dependencies resolved

It really crashed all day today. I have been looking for mistakes and solutions. I found that VM has a lot of bugs. If you are interested, you can chat with me. Of course, this article is not mainly about these bugs, but dependencies.


如果你出现类似的情况,不要慌

The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.27-3ubuntu1.6) but 2.35-0ubuntu3 is about to be installed
Depends: libc-dev-bin (= 2.27-3ubuntu1.6)
E: Unable to fix errors because you asked some packages to remain as they are, breaking dependencies between packages.

Mostly it is caused by the mismatch between the image source and your ubuntu system version. I guess you modified some image sources because the system did not find some commands before, right? Something like this.
insert image description hereThen I found that those commands can be installed. I don't know about you guys, but that's how I am anyway.

However, this is not necessarily suitable! Each release has its own codename.

I saw an author's summary, but there is no 22.04.
insert image description hereYou can check the version number by lsb_release -achecking the version number on your system.
insert image description here

You can see that the code name of our version number is jammy.

The image files of each version of Ahli are regular.
insert image description hereThese parts are named after the version number.

In other words, even if such problems occur in later versions, they can be solved in this way.

ok, now we edit this file.

sudo gedit /etc/apt/sources.list

then directly copy

#阿里源
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

Done, then execute these two commands and you're done.

sudo apt-get update
sudo apt-get upgrade

Finally, after executing this command, I found that no more errors will be reported.

sudo apt-get install libc6-dev

insert image description here

Guess you like

Origin blog.csdn.net/lishuaigell/article/details/124740342