每次“apt upgrade”或类似操作 -> 以下软件包有未满足的依赖关系

每次“apt upgrade”或类似操作 -> 以下软件包有未满足的依赖关系

我错误地运行了这个命令:

sudo dpkg--自动解除配置-i libc6_2.29-0ubuntu2_amd64.deb

现在我遇到了这个问题:

a16jorgetc@lnxd-i4e01:~$ sudo apt 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
         Breaks: nscd (< 2.29)
         Breaks: nscd:i386 (< 2.29)
         Recommends: libidn2-0 (>= 2.0.5~) but 2.0.4-1.1build2 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
 nscd : Depends: libc6 (< 2.28) but 2.29-0ubuntu2 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
a16jorgetc@lnxd-i4e01:~$ 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
         Breaks: nscd (< 2.29)
         Breaks: nscd:i386 (< 2.29)
         Recommends: libidn2-0 (>= 2.0.5~) but 2.0.4-1.1build2 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
 nscd : Depends: libc6 (< 2.28) but 2.29-0ubuntu2 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
a16jorgetc@lnxd-i4e01:~$ apt-cache policy libc-bin libc6
libc-bin:
  Installed: 2.27-3ubuntu1
  Candidate: 2.27-3ubuntu1
  Version table:
 *** 2.27-3ubuntu1 500
        500 http://reposteis.ateis.local/ubuntu bionic/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
libc6:
  Installed: 2.29-0ubuntu2
  Candidate: 2.29-0ubuntu2
  Version table:
 *** 2.29-0ubuntu2 100
        100 /var/lib/dpkg/status
     2.27-3ubuntu1 500
        500 http://reposteis.ateis.local/ubuntu bionic/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages

我有 Ubuntu 18.04.3 LTS x86_64

有人能帮我解决这个问题吗?

谢谢

答案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 upgrade

感谢“guiverc”

相关内容