I have just installed a fresh copy of ubuntu 10.10. I installed perl 5.12.2 following brian d foy's recommended outline and then installed cpanminus by invoking curl -L http://cpanmin.us | perl5.12.2 - --sudo App::cpanminus
.
Now, cpan5.12.2 works fine, but whenever I try to install a module using cpanm5.12.2 it fails finding it. e.g.:
$ sudo cpanm5.12.2 -v File::Copy::Recursive
You have make /usr/bin/make
You have LWP 5.837
You have /bin/tar: tar (GNU tar) 1.23
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching File::Copy::Recursive on cpanmetadb ...
! Finding File::Copy::Recursive on cpanmetadb failed.
Searching File::Copy::Recursive on search.cpan.org ...
! Finding File::Copy::Recursive on search.cpan.org failed.
! Couldn't find module or a distribution File::Copy::Recursive
Available commands are: l - List all installed modules m - Select a module q - Quit the program cmd? Sample outputs: Installed modules are: JavaScript::SpiderMonkey Log::Log4perl Perl cmd?
The main difference between the two is that if you have Perl you should already have the cpan command. Whereas you won't have cpanm unless/until you install it.
Type cpanm --uninstall Module::Name (note the " m ") to uninstall the module with cpanminus.
You might try using perlbrew to install a custom perl intrepreter. Then you can activate your 5.12.2 version, install cpanm (no sudo required) and install your modules as a normal user eg. "$ cpanm My::Module"
By using this method, you get custom cpanm binaries tied to each specific perlbrew version. You have to install cpan modules for every perlbrew version, but you don't end up with binaries like "cpanm5.12.2" but rather "cpanm". Perlbrew takes care of setting up a perl-version-specific path, which is rather handy IMHO.
I had the same problem. LWP uses $HTTP_PROXY
rather than $http_proxy
on my machine.
If you specify something for $http_proxy without the protocol (in my case, I was missing http:
), it will complain but seems misleading as it doesn't actually find the missing packages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With