Libc 版本错误

Libc 版本错误

我使用 ubuntu 18.04,并尝试将 libc 包从 2.27 更新到 2.29,但结果发现这是一个坏主意,每次尝试都会收到错误消息

sudo apt-get upgrade

错误信息:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libc-bin : Depends: libc6 (< 2.28) but 2.29-0ubuntu2 is installed
 libc-dev-bin : Depends: libc6 (< 2.28) but 2.29-0ubuntu2 is installed
 libc6 : Breaks: locales (< 2.29) but 2.27-3ubuntu1 is installed
         Recommends: libidn2-0 (>= 2.0.5~) but 2.0.4-1.1ubuntu0.2 is installed
         Breaks: libc6:i386 (!= 2.29-0ubuntu2) but 2.27-3ubuntu1 is installed
 libc6:i386 : Breaks: libc6 (!= 2.27-3ubuntu1) but 2.29-0ubuntu2 is installed
 libc6-dbg : Depends: libc6 (= 2.27-3ubuntu1) but 2.29-0ubuntu2 is installed
 libc6-dev : Depends: libc6 (= 2.27-3ubuntu1) but 2.29-0ubuntu2 is installed
 libc6-i386 : Depends: libc6 (= 2.27-3ubuntu1) but 2.29-0ubuntu2 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

我尝试过的事情:

sudo apt autoremove

并且它给出了同样的错误

sudo apt --fix-broken install

它给出错误信息:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 libc-bin : Depends: libc6 (< 2.28) but 2.29-0ubuntu2 is installed
 libc-dev-bin : Depends: libc6 (< 2.28) but 2.29-0ubuntu2 is installed
 libc6 : Breaks: locales (< 2.29) but 2.27-3ubuntu1 is installed
         Recommends: libidn2-0 (>= 2.0.5~) but 2.0.4-1.1ubuntu0.2 is installed
         Breaks: libc6:i386 (!= 2.29-0ubuntu2) but 2.27-3ubuntu1 is installed
 libc6:i386 : Breaks: libc6 (!= 2.27-3ubuntu1) but 2.29-0ubuntu2 is installed
 libc6-dbg : Depends: libc6 (= 2.27-3ubuntu1) but 2.29-0ubuntu2 is installed
 libc6-dev : Depends: libc6 (= 2.27-3ubuntu1) but 2.29-0ubuntu2 is installed
 libc6-i386 : Depends: libc6 (= 2.27-3ubuntu1) but 2.29-0ubuntu2 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

另一个 :

sudo apt install -f

错误消息

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 libc-bin : Depends: libc6 (< 2.28) but 2.29-0ubuntu2 is installed
 libc-dev-bin : Depends: libc6 (< 2.28) but 2.29-0ubuntu2 is installed
 libc6 : Breaks: locales (< 2.29) but 2.27-3ubuntu1 is installed
         Recommends: libidn2-0 (>= 2.0.5~) but 2.0.4-1.1ubuntu0.2 is installed
         Breaks: libc6:i386 (!= 2.29-0ubuntu2) but 2.27-3ubuntu1 is installed
 libc6:i386 : Breaks: libc6 (!= 2.27-3ubuntu1) but 2.29-0ubuntu2 is installed
 libc6-dbg : Depends: libc6 (= 2.27-3ubuntu1) but 2.29-0ubuntu2 is installed
 libc6-dev : Depends: libc6 (= 2.27-3ubuntu1) but 2.29-0ubuntu2 is installed
 libc6-i386 : Depends: libc6 (= 2.27-3ubuntu1) but 2.29-0ubuntu2 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

答案1

尝试运行以下命令:

wget http://fr.archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6_2.27-3ubuntu1_amd64.deb
sudo dpkg -i libc6_2.27-3ubuntu1_amd64.deb
sudo apt --fix-broken install
sudo apt upgrade

相关内容