Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am having issues with apt-get on my Raspberry Pi. This is the output when I try and install a package:

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 didn't help:

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)

Any suggestion on how this issue can be resolved, beside reflashing the SD and starting again?

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

Removing the corrupted package solved the problem.

sudo rm /var/cache/apt/archives/libm17n-0_1.6.3-2_armhf.deb
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.