通过 Synaptic Manager 更新时遇到错误。后续更新在输出底部显示错误。我是菜鸟,所以任何帮助我都感激不尽。
al@al:~$ sudo apt-get -f upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following NEW packages will be installed:
libjack-jackd2-0:i386
The following packages have been kept back:
linux-headers-generic skype
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/202 kB of archives.
After this operation, 493 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ... 310056 files and directories currently installed.)
Unpacking libjack-jackd2-0:i386 (from .../libjack-jackd2-0_1.9.8~dfsg.2-1precise1_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libjack-jackd2-0_1.9.8~dfsg.2-1precise1_i386.deb (--unpack):
'./usr/share/doc/libjack-jackd2-0/buildinfo.gz' is different from the same file on the system
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libjack-jackd2-0_1.9.8~dfsg.2-1precise1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
具体答案
在终端中尝试以下命令:
sudo dpkg -r libjack-jackd2-0
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade
该命令会删除有问题的文件,尝试修复损坏的依赖关系并更新您的系统。
一般答案
处理时遇到错误:
/var/cache/apt/archives/libjack-jackd2-0_1.9.8~dfsg.2-1precise1_i386.deb
E: 子进程 /usr/bin/dpkg 返回错误代码 (1)
如果您收到E: Sub-process /usr/bin/dpkg returned an error code (1)
(应为错误代码(1)),您可以尝试按照以下方法修复此问题:
记下 后面的包名
/var/cache/apt/archives/
。在本例中,文件名是libjack-jackd2-0_1.9.8~dfsg.2-1precise1_i386.deb
,因此包名是libjack-jackd2-0
(一般情况下,取文件名直到第一个“_”)。记住这些,只需运行以下命令:sudo dpkg -r libjack-jackd2-0 sudo apt-get -f install sudo apt-get update sudo apt-get upgrade
答案2
是的,我知道这个问题已经得到解答,并且答案已被接受。
但是我知道另一种解决方案。
rm /usr/share/doc/libjack-jackd2-0/buildinfo.gz
这将解决冲突并dpkg -i /path/to/deb/file.deb
成功运行。