Friday, January 23, 2009

/usr/bin/ld: cannot find -lperl

I was trying to install pp, the Perl PAR Packager:
$ sudo cpan pp
I got this error:
/usr/bin/ld: cannot find -lperl
collect2: ld returned 1 exit status
make[1]: *** [par] Error 1
make[1]: Leaving directory `/home/prystasj/.cpan/build/PAR-Packer-0.982-zX8GIO/myldr'
make: *** [subdirs] Error 2
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
I saw a suggestion to install libperl-dev, but I had that package already up-to-date.
By changing this symlink in /usr/lib from:
lrwxrwxrwx 1 root root 15 2009-01-23 15:28 /usr/lib/ ->
lrwxrwxrwx 1 root root 15 2009-01-23 15:28 /usr/lib/ ->
I was able to install pp:
$ which pp


  1. The above post for Ubuntu 8.10. For Linux Mint 6, I just needed to install libperl-dev which wasn't present by default.

  2. Yes, the same on Ubuntu 10.04.