Arch Linux — updating Perl from 5.14 to 5.16

Recent updates (in June 2012) to Arch Linux replaced Perl 5.14 with 5.16.

Imagine my surprise when Perl scripts (including cpanp) suddenly stopped working.

I asked about the problem on PerlMongers and the Arch Linux forum, and did the following to solve it:

  • Delete all files under /usr/bin/site_perl, /usr/lib/perl5/site_perl and /usr/share/perl5/site_perl to remove the duplicates installed by the cpan shell.
  • Rebuild all AUR packages that contain perl XS modules. This will print them out:
    sudo pacman -Qml | awk '/_perl/auto/$/ { print $1 }' | uniq

    (There weren't any on my system.)

  • Reinstall perl-cpanplus-dist-arch
  • Run cpanp to install the Perl modules that aren't available on Arch or AUR, for example:
    sudo cpanp -i Math::Combinatorics

Which seems to have done the job.

Leave a Reply

Your email address will not be published. Required fields are marked *