我最近没有安装任何软件包,但是当我启动软件中心时,我看到一条消息:“无法安装或删除项目......”
/我正在翻译外语转储,因此可能与原文不太准确/
这些解决方案根本不起作用。我有一种矛盾的感觉:
sudo apt-get install -f
告诉我,将安装 2 个软件包:libdbus-glib-1-2:i386 libnspr4:i386(并且需要下载 0 B/217 kB 的档案)——奇怪;为什么 x64 架构系统中需要 i386 deps?
我选择 Y 并且它转储:
(Reading database ... 300571 files and directories currently installed.)
Unpacking libdbus-glib-1-2:i386 (from .../libdbus-glib-1-2_0.98-1ubuntu1.1_i386.deb) ...
dpkg: processing error /var/cache/apt/archives/libdbus-glib-1-2_0.98-1ubuntu1.1_i386.deb (--unpack):
'./usr/share/doc/libdbus-glib-1-2/changelog.Debian.gz' is different from the same file on the system
Missing report of program apport, becouse MaxReports limit reached
Unpacking libnspr4:i386 (from .../libnspr4_4.9.5-0ubuntu0.12.04.1_i386.deb) ...
dpkg: processing error /var/cache/apt/archives/libnspr4_4.9.5-0ubuntu0.12.04.1_i386.deb (--unpack):
'./usr/share/doc/libnspr4/changelog.Debian.gz' is different from the same file on the system
Missing report of program apport, becouse MaxReports limit reached
dpkg-deb: error: subprocess paste was killed by signal (Interrupted stream)
There were errors while processing:
/var/cache/apt/archives/libdbus-glib-1-2_0.98-1ubuntu1.1_i386.deb
/var/cache/apt/archives/libnspr4_4.9.5-0ubuntu0.12.04.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
因此我删除了/var/cache/
文件夹以防万一;然后尝试独立安装所需的 deps:
sudo apt-get install libdbus-glib-1-2:i386
转储:
You need to use "apt-get -f install", to repair following problems:
Following packages has broken dependencies:
libnss3:i386 : Requires: libnspr4:i386 (>= 4.8.6) but it will be not installed
E: Broken dependencies. Please try use "apt-get -f install" without packages (or give a solution).
于是我就这么做了:
sudo apt-get install libnspr4:i386
并转储:
You need to use "apt-get -f install", to repair following problems:
Following packages has broken dependencies:
libgconf-2-4:i386 : Requires: libdbus-glib-1-2:i386 (>= 0.78) but it will be not installed
E: Broken dependencies. Please try use "apt-get -f install" without packages (or give a solution).
两者都需要允许安装另一个?矛盾吗?我陷入了混乱。
ps,如果找不到解决方案,我可以从其他工作镜像电脑复制软件包/只是不想克隆整个分区/,哪个文件夹用于存储这些软件包?
答案1
我一个文件夹一个文件夹地查看,一个文件一个文件地查看,终于找到了!是/var/lib/dpkg/status
文件。
我已经修复了,软件中心奇迹般地好了。
/ps. 恢复整个根分区不起作用,因为我忘记已将 var 文件夹放入其他分区并 ln 到该分区;)