15.04 升级失败后 dpkg 损坏

15.04 升级失败后 dpkg 损坏

我在上班前开始升级 ubuntu,但后来发现有些东西坏了。经过一番努力,我获得了更多信息来解决这个问题,我做了以下事情:

>sudo apt-get dist-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:
 ia32-libs : Depends: ia32-libs-multiarch but it is not installable
 libc6-dbg : Depends: libc6 (= 2.19-0ubuntu6.6) but 2.19-10ubuntu2.3 is installed
 libpcre3-dev : Depends: libpcre3 (= 1:8.31-2ubuntu2) but 1:8.35-3ubuntu1 is installed
 skype : Depends: skype-bin but it is not installable
E: Unmet dependencies. Try using -f.

因此尝试 -f...

>sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libc6-dbg libpcre3-dev libpcrecpp0
The following packages will be REMOVED:
 ia32-libs skype
The following packages will be upgraded:
  libc6-dbg libpcre3-dev libpcrecpp0
3 upgraded, 0 newly installed, 2 to remove and 1649 not upgraded.
160 not fully installed or removed.
Need to get 0 B/3,799 kB of archives.
After this operation, 242 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
E: Sub-process /usr/bin/dpkg returned an error code (2)

检查 dpkg......

>sudo dpkg
dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-architecture'

有人可以给出建议吗?

答案1

你能尝试一下吗?

$ sudo dpkg --configure -a

如果这没用,您可以尝试删除 /etc/dpkg/dpkg.cfg.d/multiarch(或更好的备份),然后发出

$ sudo dpkg --add-architecture foreign-architecture

相关内容