I cannot install any new package or upgrade existing packages.

"sudo apt-get update" throws no error:

sudo apt-get update
Hit http://ftp.debian.org jessie-backports InRelease
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://repo.mosquitto.org jessie InRelease
Get:1 http://ftp.debian.org jessie-backports/main armhf Packages/DiffIndex [27.8                                                                                                              kB]
Get:2 https://dl.bintray.com stable InRelease
Ign https://dl.bintray.com stable InRelease
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit https://dl.bintray.com stable Release.gpg
Hit http://archive.raspberrypi.org jessie InRelease
Get:3 http://ftp.debian.org jessie-backports/main Translation-en/DiffIndex [27.8                                                                                                              kB]
Hit http://repo.mosquitto.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Hit https://dl.bintray.com stable Release
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Ign http://repo.mosquitto.org jessie/main Translation-en
Hit https://dl.bintray.com stable/main armhf Packages
Get:4 https://dl.bintray.com stable/main Translation-en
Get:5 https://dl.bintray.com stable/main Translation-en
Get:6 https://dl.bintray.com stable/main Translation-en
Get:7 https://dl.bintray.com stable/main Translation-en
Get:8 https://dl.bintray.com stable/main Translation-en
Ign https://dl.bintray.com stable/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Fetched 55.6 kB in 7s (7698 B/s)
Reading package lists... Done

"sudo apt-get upgrade" thows error:

sudo apt-get upgrade
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:
 perl : Depends: perl-modules (>= 5.20.2-3+deb8u8) but 5.20.2-3+deb8u7 is installed
E: Unmet dependencies. Try using -f.

I tried "apt-get -f install" but it still failes:

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:
Suggested packages:
  libb-lint-perl libcpanplus-dist-build-perl libcpanplus-perl libfile-checktree-perl libobject-accessor-perl
The following packages will be upgraded:
1 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
3 not fully installed or removed.
Need to get 0 B/2547 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Selecting previously unselected package perl-modules.
dpkg: warning: files list file for package 'npm' missing; assuming package has no files currently installed
(Reading database ... 72903 files and directories currently installed.)
Preparing to unpack .../perl-modules_5.20.2-3+deb8u8_all.deb ...
Unpacking perl-modules (5.20.2-3+deb8u8) over (5.20.2-3+deb8u7) ...
dpkg: error processing archive /var/cache/apt/archives/perl-modules_5.20.2-3+deb8u8_all.deb (--unpack):
 unable to make backup link of `./usr/share/perl/5.20.2/Math/BigInt/Calc.pm' before installing new version: Operation not permitted
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I also tried this:

  1. sudo dpkg -i --force-overwrite /var/cache/apt/archives/perl-modules_5.20.2-3+deb8u8_all.deb
  2. sudo dpkg -r perl-modules
  3. sudo apt-get purge perl-modules
  4. ...

but I still get the same error message. Can you please help me with this issue?

  • Weird. I have problems with perl-modules too on my RPi3; trying to update them with apt causes the disk ("settings" partition) to go offline and gives a "broken pipe" error. I was assuming it was a sdcard corruption but now it looks like it's a problem with updating perl-modules in place. – pbhj May 2 '18 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.