Installing libwww-perl on Ubuntu 12.04,SE

Solution 1:

First, I would strongly advise against the direct 'perl way' installs, they will only make the mess bigger. You don't need these in Ubuntu. libwww-perl exists as a standard Ubuntu package.

Since this doesn't work. You should start by cleaning up your installation which seems to be broken. First, try cleaning-up your package installs like this:

sudo apt-get install -f
sudo apt-get update --fix-missing

and only when you don't get errors, move on to installing libwwww-perl, using:

sudo apt-get install libwww-perl

Also:

You seem to have a very unusual (non-standard) list of directories perl is searching libraries in. For example, there shouldn't be a /etc/perl in the places to look for libraries, and on Ubuntu you don't need anything starting with /usr/local.

To check whether the package is installed, you may check the output of:

dpkg-query -S libwww-perl

Check your env for bad forced perl paths:

env | grep PERL

If this gives any output, I would remove it from the environment before running perl: Look at your startup files (~/.bashrc in particular end comment these non standard settings out)

Good luck!

Solution 2:

Try changing the download server. Software sources -> Ubuntu Software -> Download from: select the nearest geo from the list.

or

Try the Perl way of installion

perl -MCPAN -e 'install Bundle::LWP'

or

wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/libwww-perl-6.04.tar.gz
tar xzf libwww-perl-6.04.tar.gz
cd libwww-perl-6.04
perl Makefile.PL
make
sudo make install

(My download source picked one of the India server to download the file http://perlmirror.indialinks.com/authors/id/G/GA/GAAS/libwww-perl-6.04.tar.gz )

If you are downloading the LWP module in your home directory then don't forget to add the path to your perl @INC