apt-get -f install卡在“损坏的文件系统tarfile”上


10

apt-getRaspberry Pi上遇到问题。这是我尝试安装软件包时的输出:

pi@raspberrypi ~ $ sudo apt-get -f install cowsay
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:
 emacs23 : Depends: libm17n-0 (>= 1.6.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

sudo apt-get -f install 没有帮助:

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:
  libm17n-0
Suggested packages:
  m17n-docs
The following NEW packages will be installed:
  libm17n-0
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
12 not fully installed or removed.
Need to get 0 B/258 kB of archives.
After this operation, 837 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Use of uninitialized value $value in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 65, <$__ANONIO__> line 515.
(Reading database ... 58096 files and directories currently installed.)
Unpacking libm17n-0 (from .../libm17n-0_1.6.3-2_armhf.deb) ...
dpkg: error processing /var/cache/apt/archives/libm17n-0_1.6.3-2_armhf.deb (--unpack):
 corrupted filesystem tarfile - corrupted package archive
dpkg-deb (subprocess): decompressing archive member: internal gzip read error: '<fd:4>: invalid distance too far back'
dpkg-deb: error: subprocess <decompress> returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libm17n-0_1.6.3-2_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

除了重新刷新SD并重新启动之外,关于如何解决此问题的任何建议?

Answers:


7

删除损坏的程序包解决了该问题。

sudo rm /var/cache/apt/archives/libm17n-0_1.6.3-2_armhf.deb

0

有此问题的任何人都应该使用“智能”,即使删除.deb文件有时也无法正常工作。

aptitude update
aptitude dist-upgrade

在此步骤中,系统将询问您是否要删除依赖关系未满足的软件包?您应该说“是”,然后让能力来做这项工作,最后您会看到“ apt-get”将不再卡在未满足的依赖项上。

在此答案中,我假设您想中止安装并删除损坏的软件包文件。


1
我在智能方面也遇到了同样的错误。仅删除损坏的存档有效。
partofthething

等等什么?不记得我处理这个问题的时间了,删除文件并不能解决我的问题。我不记得我是如何弄乱我的系统的,但是我绝对记得经过数小时的挣扎之后,什么也没起作用。@partofthething
Brian SP2
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.