当我运行 sudo apt-get -f install 时,它显示 dpkg:错误处理。我还运行了sudo dpkg -i --force-overwrite /var/cache/apt/archives/libc6_2.27-3ubuntu1_amd64.deb
sudo dpkg -i --force-overwrite /var/cache/apt/archives/libc6_2.27-
3ubuntu1_amd64.deb
(Reading database ... 362976 files and directories currently
installed.)
Preparing to unpack .../libc6_2.27-3ubuntu1_amd64.deb ...
dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-
3ubuntu1_amd64.deb (--install):
subprocess new pre-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.27-3ubuntu1_amd64.de
grep -r deb /etc/apt/sources.list /etc/apt/sources.list.d
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic main restricted universe
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
/etc/apt/sources.list:deb http://archive.canonical.com/ubuntu bionic partner
apt-get -f install
Do you want to continue? [Y/n] Y
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 362976 files and directories currently installed.)
Preparing to unpack .../libc6_2.27-3ubuntu1_amd64.deb ...
dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-3ubuntu1_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.27-3ubuntu1_amd64.deb
回音apt-cache policy libc-bin
root@2wy:/etc/apache2/sites-enabled# apt-cache policy libc-bin
libc-bin:
Installed: 2.23-0ubuntu10
Candidate: 2.27-3ubuntu1
Version table:
2.27-3ubuntu1 500
500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
*** 2.23-0ubuntu10 100
100 /var/lib/dpkg/status
答案1
答案2
我遇到了同样的问题。我已删除 中的所有文件,/usr/share/doc/libc6
然后libc6
从 中删除/usr/share/lintian/overrides/
。终于sudo apt -f install
解决了。
答案3
首先你可以尝试sudo apt upgrade libc-bin
根据软件包搜索,您的版本来自 xenial。
当问题无法通过这种方式解决时,请尝试sudo apt install --reinstall libc-bin=2.27-3ubuntu1
没有运气?wget -c http://mirrors.kernel.org/ubuntu/pool/main/g/glibc/libc-bin_2.27-3ubuntu1_amd64.deb
绘制包并使用dpkg -i libc-bin_2.27-3ubuntu1_amd64.deb