Search code examples
perlcpan

cpan getting killed when installing Log::Log4perl


I'm trying to install the perl module Log::Log4perl on a basic Digital Ocean server through Ubuntu as a backup tool I'm trying to use depends on it but it keeps saying "Killed". Could anyone with experience with cpan provide some guidiance on where I can find a log file telling me what the problem is?

$ cpan Log::Log4perl
Reading '/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Reading '/root/.cpan/sources/modules/02packages.details.txt.gz'
  Database was generated on Sat, 27 Jun 2015 12:17:02 GMT
  HTTP::Date not available
..............
  New CPAN.pm version (v2.10) available.
  [Currently running version is v2.00]
  You might want to try
    install CPAN
    reload cpan
  to both upgrade CPAN.pm and run the new version without leaving
  the current session.


............Killed

Solution

  • It appears that this is a resource issue and it looks like other people have had similar issues with this as well. At the point in the run that you're showing, CPAN is trying to slurp that entire 02packages.details.txt.gz file into memory which is causing your OS to kill the process.

    Take a look at this answer for instructions on how to use cpanm, or you could try downloading the module as a gz and run perl Makefile.PL && make && make install.