![我正在尝试安装程序/apt 升级,但这组库不允许我这样做](https://linux22.com/image/870811/%E6%88%91%E6%AD%A3%E5%9C%A8%E5%B0%9D%E8%AF%95%E5%AE%89%E8%A3%85%E7%A8%8B%E5%BA%8F%2Fapt%20%E5%8D%87%E7%BA%A7%EF%BC%8C%E4%BD%86%E8%BF%99%E7%BB%84%E5%BA%93%E4%B8%8D%E5%85%81%E8%AE%B8%E6%88%91%E8%BF%99%E6%A0%B7%E5%81%9A.png)
我不能,我也尝试使用软件中心安装软件,但没有成功,因为这些库需要依赖项。我尝试删除它们, apt-get upgrade
但没有用,我还尝试了其他各种命令,例如sudo apt-get clean
,,,,和。sudo apt-get dist-upgrade
sudo apt-get remove
sudo dpkg --configure -a
sudo apt-get -f install
软件中心:
installArchives() failed: (Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 206010 files and directories currently installed.)
Preparing to unpack .../libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb ...
Unpacking libc6-dev-i386 (2.19-0ubuntu6.6) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb (--unpack):
trying to overwrite '/usr/include/bits', which is also in package libc6-dev-amd64 2.19-0ubuntu6.6
Errors were encountered while processing:
/var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb
Error in function:
dpkg: dependency problems prevent configuration of gcc-4.8-multilib:
gcc-4.8-multilib depends on libc6-dev-i386 (>= 2.11); however:
Package libc6-dev-i386 is not installed.
dpkg: error processing package gcc-4.8-multilib (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libc6-dev-x32:
libc6-dev-x32 depends on libc6-dev-i386 (= 2.19-0ubuntu6.6); however:
Package libc6-dev-i386 is not installed.
dpkg: error processing package libc6-dev-x32 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gcc-multilib:
gcc-multilib depends on gcc-4.8-multilib (>= 4.8.2-5~); however:
Package gcc-4.8-multilib is not configured yet.
dpkg: error processing package gcc-multilib (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of g++-4.8-multilib:
g++-4.8-multilib depends on gcc-4.8-multilib (= 4.8.2-19ubuntu1); however:
Package gcc-4.8-multilib is not configured yet.
dpkg: error processing package g++-4.8-multilib (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of g++-multilib:
g++-multilib depends on gcc-multilib (>= 4:4.8.2-1ubuntu6); however:
Package gcc-multilib is not configured yet.
g++-multilib depends on g++-4.8-multilib (>= 4.8.2-5~); however:
Package g++-4.8-multilib is not configured yet.
dpkg: error processing package g++-multilib (--configure):
dependency problems - leaving unconfigured
apt-get upgrade
:
keegan@keeganserver:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
gcc-4.8-multilib : Depends: libc6-dev-i386 (>= 2.11) but it is not installed
libc6-dev-x32 : Depends: libc6-dev-i386 (= 2.19-0ubuntu6.6) but it is not installed
E: Unmet dependencies. Try using -f.
和-f
:
keegan@keeganserver:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
cpp-4.4 diffstat gcc-4.4-base intltool-debian libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libapt-pkg-perl
libarchive-zip-perl libautodie-perl libclass-accessor-perl libclone-perl
libdpkg-perl libemail-valid-perl libfile-fcntllock-perl libio-pty-perl
libio-string-perl libipc-run-perl libipc-system-simple-perl
liblist-moreutils-perl libnet-dns-perl libnet-domain-tld-perl libnet-ip-perl
libparse-debianchangelog-perl libperlio-gzip-perl libsub-identify-perl
libsub-name-perl libtext-levenshtein-perl libupstart1 patchutils t1utils
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libc6-dev-i386
The following NEW packages will be installed:
libc6-dev-i386
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 0 B/1,148 kB of archives.
After this operation, 6,333 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 206010 files and directories currently installed.)
Preparing to unpack .../libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb ...
Unpacking libc6-dev-i386 (2.19-0ubuntu6.6) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb (--unpack):
trying to overwrite '/usr/include/bits', which is also in package libc6-dev-amd64 2.19-0ubuntu6.6
Errors were encountered while processing:
/var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
尝试这个
只需按下键盘上的 Ctrl+Alt+T 即可打开终端。打开后,运行以下命令:
首先,通过rm
命令删除损坏的文件:
sudo rm -fr /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb
现在,改变你的sources.list
从这里生成你的新列表:
http://repogen.simplylinux.ch/
复制所有行并替换它们(使用您最喜欢的编辑器,我在这里使用了 vim)
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bk
sudo vim.tiny /etc/apt/sources.list
现在运行以下几行:
sudo apt-get clean
sudo apt-get update
sudo apt-get -f install