The CPAN shell runs out of memory. How can I give it more memory on Unix?

I get an Out of memory! message Out of memory! for all installations. I have never used cpan before, and I'm not quite sure how this works. I made ulimit in the /.cpan directory and this led to unlimited. Here is what I look at:

  [/ usr / bin] # perl -MCPAN -e shell
 Terminal does not support AddHistory.

 cpan shell - CPAN exploration and modules installation (v1.7602)
 ReadLine support available (try 'install Bundle :: CPAN')

 cpan> install Term :: Readline
 CPAN: Storable loaded ok
 Going to read /.cpan/Metadata
 Going to read /.cpan/sources/authors/01mailrc.txt.gz
 Going to read /.cpan/sources/modules/02packages.details.txt.gz
   Database was generated on Tue, 19 Jun 2012 11:51:03 GMT
 CPAN: HTTP :: Date loaded ok

   There a new CPAN.pm version (v1.9800) available!
   [ Current version is v1.7602 ]
   You might want to try
     install Bundle :: CPAN
     reload cpan
   without quitting the current session.  It should be a seamless upgrade
   while we are running ...

 Out of memory!
 Terminal does not support GetHistory.
 Lockfile removed. 
+4
source share
6 answers

This is not about increasing the amount of memory, but about a possible solution for you.

You can use cpanm instead of cpan, therefore:

This will install cpanm for you

  $ curl -L http://cpanmin.us |  perl - --self-upgrade 

and after installing the modules, for example:

  $ cpanm Task :: Plack 

cpanm requires much less memory.

+12
source

Another reason is that the user you use to run cpan has a limit on the amount of memory that he can use. Run these commands to use all available memory:

 ulimit -m unlimited ulimit -d unlimited 
+4
source

On AIX (as tagged), the culprit is probably disabled or the environment variable LDR_CNTRL is too small.

0
source

We got the same error (Out of memory!) After updating service packs and updating the AIX service level. After reinstalling Perl to the latest version (compilation from source), the error disappeared. We noticed that the AIX SP + ML update overwrites the links to our self-installed tools in / usr / bin (make and iconv). We assume that the AIX SP + ML update did similar things with self-tuning perl.

0
source

I found one solution for CPAN Out of Memory errors - install swap if you don't have one. There is a good step-by-step tutorial on how to do this on Ubuntu 14.04 (with wider Linux applicability) here .

0
source

If there is a problem with insufficient memory when using CPAN (I have a server on which I am doing perl dev on which I specifically installed 512 megabytes of RAM), cpanm is your savior, as mentioned above. This particular server will beat by splitting the perl content file, so I cannot use cpan to update. However, cpanm fixed everything the first time I used it, and because of its ease of use and stability, I ONLY support my perl servers.

Ron

0
source

All Articles