Trying to install CPAN

Solution 1:

OK, you're mixing up quite a few things here.

  • cpan is an installer for Perl modules from the CPAN, and it is installed by default
  • You don't download CPAN packages manually, but do `cpan CAM::PDF' to install from CPAN.
  • /usr/local/lib/pkgconfig is a very strange place to put these things, better delete that again.

But all of that is not needed, as Ubuntu ships CAM::PDF:

sudo apt-get install libcam-pdf-perl

Generally, if a Perl library is named Foo::Bar on CPAN, the Debian/Ubuntu package will be named libfoo-bar-perl. Use these packages before trying to install them with cpan from CPAN.