在我中断更新过程后,出现大量损坏的软件包

在我中断更新过程后,出现大量损坏的软件包

我使用来自 myhosting.com 的运行 Ubuntu 12.04 的 VPS,只能通过 ssh 访问。

昨天我运行了以下命令:

sudo apt-get install lame build-essential libffi-dev

我让它运行,直到我注意到一条消息询问我是否应该删除某些 mysql 数据库“ after phpmyadmin was removed”。我很慌张 - 因为我没有意识到会删除 phpmydmin;并中断了该过程。从那时起,我遇到了大量损坏的软件包,无法安装任何东西,因为 dkpg 失败了。

以下是我在运行安装时收到的错误消息apt-get -f。我应该从哪里开始恢复损坏的软件包?


root@vps-1150506-19848:/# 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:   
init-system-helpers initramfs-tools initramfs-tools-bin klibc-utils
libalgorithm-diff-xs-perl libapt-pkg-perl libapt-pkg4.16 libc-dev-bin
libc6-dev libklibc lsb-base upstart
Suggested packages:
bash-completion glibc-doc graphviz upstart-monitor
The following NEW packages will be installed:
 libapt-pkg4.16
The following packages will be upgraded:
init-system-helpers initramfs-tools initramfs-tools-bin klibc-utils
 libalgorithm-diff-xs-perl libapt-pkg-perl libc-dev-bin libc6-dev libklibc
lsb-base upstart
11 upgraded, 1 newly installed, 0 to remove and 1179 not upgraded.
48 not fully installed or removed.
Need to get 0 B/3392 kB of archives.
After this operation, 2959 kB of additional disk space will be used.
Do you want to continue? [Y/n]
E: Could not open file descriptor -1
E: Prior errors apply to /var/cache/apt/archives/libc-dev-bin_2.21-0ubuntu4_amd64.deb
E: Prior errors apply to /var/cache/apt/archives/initramfs-tools_0.120ubuntu3_all.deb
E: Prior errors apply to /var/cache/apt/archives/upstart_1.13.2-0ubuntu14_amd64.deb
E: Prior errors apply to /var/cache/apt/archives/init-system-helpers_1.23ubuntu3_all.deb
E: Prior errors apply to /var/cache/apt/archives/initramfs-tools-bin_0.120ubuntu3_amd64.deb
E: Prior errors apply to /var/cache/apt/archives/libklibc_2.0.3-0ubuntu1_amd64.deb
E: Prior errors apply to /var/cache/apt/archives/klibc-utils_2.0.3-0ubuntu1_amd64.deb
E: Prior errors apply to /var/cache/apt/archives/lsb-base_4.1+Debian11ubuntu8_all.deb
E: Prior errors apply to /var/cache/apt/archives/libapt-pkg4.16_1.0.9.10ubuntu6_amd64.deb
E: Prior errors apply to /var/cache/apt/archives/libalgorithm-diff-xs-perl_0.04-3build1_amd64.deb
E: Prior errors apply to /var/cache/apt/archives/libapt-pkg-perl_0.1.29build3_amd64.deb
debconf: apt-extracttemplates failed: No such file or directory
dpkg: error processing package libgcc1:amd64 (--configure):
package libgcc1:amd64 1:5.2.1-16ubuntu1 cannot be configured because libgcc1:i386 is at a different version (1:4.6.3-1ubuntu5)
dpkg: error processing package libc6:amd64 (--configure):
package libc6:amd64 2.21-0ubuntu4 cannot be configured because libc6:i386 is at a different version (2.19-0ubuntu6.3~ubuntu14.04.1~ppa1)
dpkg: dependency problems prevent configuration of multiarch-support:
multiarch-support depends on libc6 (>= 2.3.6-2); however:
Package libc6:amd64 is not configured yet.

dpkg: error processing package multiarch-support (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libgcc1:amd64
libc6:amd64
multiarch-support

 E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

您有一些 :i386 软件包应该安装为 -i386:amd64 而不是 :i386

运行以下命令并发布任何错误:

sudo apt-get clean
sudo apt-get update
sudo dpkg -P libgcc1:i386 libc6:i386
sudo apt-get install libgcc1-i386 libc6-i386 
sudo apt-get -f install
sudo apt-get upgrade

您可能想做一个但只有当您知道自己在做什么时才dist-upgrade可以运行!dist-upgrade

相关内容