perl

Error: cpan Out of memory! for update perl modules.

Posted on Updated on

I’m getting an Out of memory! message for all installs. because cpan was not compiled  for unlimiter memory usage.

root@host01 [/home/]# cpan
cpan> install Build
CPAN: Storable loaded ok (v2.16)
Going to read '/home/.cpan/Metadata'
 Database was generated on Thu, 24 Mar 2011 14:41:02 GMT
Going to read '/home/.cpan/sources/authors/01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.03)
............................................................................DONE
Going to read '/home/.cpan/sources/modules/02packages.details.txt.gz'
Out of memory!
Lockfile removed.

I did a ulimit on the /.cpan directory and it resulted in unlimited. I used cpanm work with less memory.

root@host01 [~]# curl -L http://cpanmin.us | perl – –self-upgrade

root@host01 [/home/.cpan/sources/modules]# curl -L http://cpanmin.us | perl - --self-upgrade
 % Total % Received % Xferd Average Speed Time Time Time Current
 Dload Upload Total Spent Left Speed
100 357k 100 357k 0 0 159k 0 0:00:02 0:00:02 --:--:-- 447k
You are running cpanm from the path where your current perl won't install executables to.
Because of that, cpanm --self-upgrade won't upgrade the version of cpanm you're running.

cpanm path : -
 Install path : /usr/bin

It means you either installed cpanm globally with system perl, or use distro packages such
as rpm or apt-get, and you have to use them again to upgrade cpanm.
--> Working on App::cpanminus
Fetching http://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.6005.tar.gz ... OK
Configuring App-cpanminus-1.6005 ... OK
Building and testing App-cpanminus-1.6005 ... OK
Successfully installed App-cpanminus-1.6005
1 distribution installed

root@host01 [~]# cpanm Build

Now everything seems fine.

 

Advertisements