9

I just did a system update on Arch Linux (pacman -Syu) and saw a warning about there being old Perl modules:

WARNING: '/usr/lib/perl5/site_perl' contains data from at least 2 packages which will NOT be used by the installed perl interpreter. -> Run the following command to get a list of affected packages: pacman -Qqo '/usr/lib/perl5/site_perl' WARNING: '/usr/lib/perl5/vendor_perl' contains data from at least 8 packages which will NOT be used by the installed perl interpreter. -> Run the following command to get a list of affected packages: pacman -Qqo '/usr/lib/perl5/vendor_perl' 

Running the recommended commands yielded the following:

$ pacman -Qqo '/usr/lib/perl5/site_perl' gscan2pdf perl-filesys-df $ pacman -Qqo '/usr/lib/perl5/vendor_perl' perl-config-general perl-data-uuid perl-goo-canvas perl-gtk2-ex-simple-list perl-gtk2-imageview perl-pdf-api2 perl-sane perl-set-intspan 

I encountered something similar once before when the version of Perl was updated. If I recall correctly those Perl packages needed to be rebuilt; however, I do not remember where I found the incantation to do this. Please note that I have absolutely no experience with Perl. Those modules are simply used by gscan2pdf which I installed through AUR. How do I rebuild these Perl modules?

2
  • 1
    You reinstall them from the AUR, and hope that the maintainer has updated the PKGBUILDs to conform to the new library path. Commented Sep 8, 2017 at 3:13
  • 3
    Please do not pass two y options to pacman -S, as this fully rebuilds your sync database unconditionally, rather than simply retrieving deltas. -Syy is only necessary when your sync database has become corrupt somehow. Doing this regularly provides no additional benefit and merely wastes bandwidth for both you and the mirror you're using. Commented Oct 3, 2018 at 18:34

2 Answers 2

7

To rebuild the perl libraries from AUR for pacmanager I use yaourt:

yaourt -S --asdeps perl-gnome2-gconf glade-perl perl-crypt-blowfish perl-gnome2-vte perl-expect perl-crypt-rijndael perl-gtk2-ex-simple-list perl-io-stty perl-io-tty perl-net-arp perl-yaml perl-crypt-cbc perl-gtk2-unique perl-socket6 uuid 

so just replace the libraries with the ones pacman gave you:

yaourt -S --asdeps gscan2pdf perl-filesys-df perl-config-general perl-data-uuid perl-goo-canvas perl-gtk2-ex-simple-list perl-gtk2-imageview perl-pdf-api2 perl-sane perl-set-intspan 

Update 2018 additional

the perl 5.28 update in Arch means that you have to rebuild all unsupported packages again. The solution to fix dependency errors is to remove the offending AUR perl application & then remove the orphan perl libraries & update your system:

sudo pacman -Rns $(pacman -Qtdq) sudo pacman -Syu 

Finally reinstall the AUR perl application.

Update 2019 additional

With the perl 5.30.0 update pacman now gives warnings about old perl libs. This time I had a big update & needed to do the following:

sudo pacman -R $conflicting_perl_mod_&_app sudo pacman -Syu # pacman now generates a warning for unused perl libs pacman -R $(pacman -Qqo '/usr/lib/perl5/5.28') pacman -S $perl_app # optional remove orphaned packages sudo pacman -Rns $(pacman -Qtdq) sudo pacman -Syu 
2
  • I use pacaur, but the solution is the same: reinstall the packages. Commented Dec 20, 2017 at 17:01
  • The updated information you provided is inaccurate. pacman -Rns $(pacman -Qtdq) will remove all orphaned packages on the system, not just orphaned perl library packages. Commented Oct 3, 2018 at 18:38
2

Adding onto Stuart Cardall's answer, make a .sh script to rebuild the listed perl modules, then you can just run that whenever you update perl and get that warning:

#!/bin/bash yaourt -S --asdeps --noconfirm $(pacman -Qqo '/usr/lib/perl5/vendor_perl') yaourt -S --asdeps --noconfirm $(pacman -Qqo '/usr/lib/perl5/site_perl') 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.