Reputation:
I've been trying to install the Date::Manip perl module and i keep getting this error
[root@localhost ~]# cpanm Date::Manip
! Finding Date::Manip on cpanmetadb failed.
! cannot open file '/root/.cpanm/sources/http%www.cpan.org/02packages.details.txt.gz':
No such file or directory opening compressed index
! Couldn't find module or a distribution Date::Manip
What is wrong with the cpanmetadb site ? Running the --verbose option with cpanm got me this output
[root@localhost .cpanm]# cpanm Date::Manip --verbose
cpanm (App::cpanminus) 1.7001 on perl 5.010001 built for x86_64-linux-thread-multi
Work directory is /root/.cpanm/work/1380194227.8657
You have make /usr/bin/make
You have LWP 5.833
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 Date::Manip on cpanmetadb ...
! Finding Date::Manip on cpanmetadb failed.
Searching Date::Manip () on metacpan ...
! Could not find a release matching Date::Manip () on MetaCPAN.
Searching Date::Manip on mirror http://www.cpan.org ...
Downloading index file http://www.cpan.org/modules/02packages.details.txt.gz ...
Uncompressing index file...
! cannot open file '/root/.cpanm/sources/http%www.cpan.org
/02packages.details.txt.gz': No such file or directory opening compressed index
! Couldn't find module or a distribution Date::Manip
Upvotes: 2
Views: 10860
Reputation: 41
I had the same issue with all cpanm install attempts failing using perlbrew's bin/cpanm. It took a few steps to fix. Effectively, cpan could not get outside of my LAN so I had to specify my proxy in additional locations than wgetrc and .curlrc.
Make sure you have an environment variable set using:
export HTTP_PROXY="http://my_url_to_proxy:my_port"
Make sure cpan has the same proxy setting:
cpan
o conf /proxy/
Now look at your value for http_proxy, if it is empty proceed with next line:
o conf init http_proxy
Type ENTER, then enter the value.
http_proxy [http://my_url_to_proxy:my_port]
That got it for me. If you still have issues, while in cpan issue the following command:
o conf
and look at the settings for both 'curl' and 'wget'. Make sure they are not empty '[]'. At least one should have a value, for example:
wget [/usr/bin/wget]
I suggest you test wget and/or curl by themselves on the command line to make sure you can even reach cpan.org by issuing:
wget -qO- http://search.cpan.org
See if you get a stream of data to your console. If not, work that issue first.
Upvotes: 1
Reputation: 3787
Do wget or curl work on that file? I have the same cpanm problem due to some network issues. Try:
wget http://www.cpan.org/modules/02packages.details.txt.gz
curl -O http://www.cpan.org/modules/02packages.details.txt.gz
Upvotes: 0
Reputation: 5069
Something wrong with the filename.
! cannot open file '/root/.cpanm/sources/http%www.cpan.org <-- newline and %
/02packages.details.txt.gz':
I am suspecting that something wrong in your cpan(m) config.
Maybe a sellf upgrade helps
cpanm --verbose --self-upgrade
cpanm --reinstall App::cpanminus
You could uuse cpanm to install something from a direct URL:
cpanm http://search.cpan.org/CPAN/authors/id/S/SB/SBECK/Date-Manip-6.41.tar.gz
Or you could try to use a mirror:
cpanm --mirror http://cpan.cpantesters.org/ Date::Manip
Upvotes: 3