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
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.
You are most likely running out of memory. I have had this issue when using a VM with 1GB of RAM and adding some swap space fixes the problem.
Related
I've inherited a Perl project that uses a number of Perl modules. I've been trying to set up the environment, but it's been a nightmare. I'm now on day two of just trying to install the modules. The developer who's handing this off said he was able to install everything in about half an hour, and he never saw any of these problems.
My Environment:
Windows 10 Enterprise 20H2
Intel(R) Core(TM) i7-10850H CPU # 2.70GHz
32GB
64 bit
Strawberry Perl revision 5 version 32 subversion 1
Using CPAN Client, I've been able to install a number of modules without any issue. CPAN::Author, Test::MockObject, pp, Tk, Archive::Any, and a few others all just worked. However, POE has been a disaster.
Most times, I get stuck with a "can't move" failure:
cpan[1]> install POE
Database was generated on Tue, 26 Jul 2022 14:02:23 GMT
Running install for module 'POE'
Checksum for C:\strawberry\cpan\sources\authors\id\B\BI\BINGOS\POE-1.370.tar.gz ok
Scanning cache C:\strawberry\cpan\build for sizes
............................................................................DONE
Couldn't move C:\strawberry\cpan\build\tmp-12468\POE-1.370\lib to C:\strawberry\cpan\build\POE-1.370-0\lib: No such file or directory; #82295? CPAN::VERSION=2.28; File::Copy::VERSION=2.34; C:\strawberry\cpan\build\tmp-12468\POE-1.370\lib exists; C:\strawberry\cpan\build\POE-1.370-0\lib does not exist; cwd=C:/strawberry/cpan/build/tmp-12468;
I've run cpan from the command line, I've run the CPAN Client, I've run both variations as administrator, and nothing seems to work.
I've tried the "copy-hacked.pm" fix described at https://rt.cpan.org/Public/Bug/Display.html?id=82295
On some occasions, after blowing away all CPAN\BUILD\POE* directories, tmp* directories and POE*.yml files, rebooting, and running CPAN Client as administrator, I have actually gotten it (sometimes) to actually start installing/building, but then it gets stuck at "t/10_units/04_drivers/01_sysrw.t................1/17", where it sits for over an hour before we kill it.
I've tried copying the CPAN\build\POE*.* directories and POE*.yml files from the other developer, and run reload index/reload cpan, but that doesn't work, either.
Everyone else is just saying "it works for me", which doesn't really help.
Does anyone have any idea how I can force an installation of POE? Unfortunately, everything I'm finding online just says "all you have to to is run CPAN POE", so there's not much beyond that.
Needless to say, "debug perl installation process" wasn't part of the handoff plan, but right now we have no idea how to proceed.
Any help would be appreciated.
I’m a mere mortal using Cygwin on Win7 and wanting to develop perl scripts using SOAP::lite. Installation instructions I found at soaplite.com directed me to start with perl –MCPAN –e shell before attempting an > install SOAP::lite
The newb in me didn’t appreciate that my windows user profile has a space character in it and the CPAN set-up seemed to go all horribly wrong around the point where the script was writing make files for local::lib, MYMETA.yml and MYYMETA.json. I got “no such file or directory” messages quoting only the portion of the path that followed the space in my user profile.
$ uname -a
CYGWIN_NT-6.1 UKLHRL00020 2.0.4(0.287/5/3) 2015-06-09 12:22 x86_64 Cygwin
$ cpan --version
Loading internal null logger. Install Log::Log4perl for logging messages
/usr/bin/cpan version 1.61 calling Getopt::Std::getopts (version 1.06 [paranoid]),
running under Perl version 5.14.4.
[Now continuing due to backward compatibility and excessive paranoia.
See ``perldoc Getopt::Std'' about $Getopt::Std::STANDARD_HELP_VERSION.]
Nothing to install!
When I ran perl –MCPAN –e shell for the first time, it did report “Warning: You do not have write permission for Perl library directories.” and I elected for the default option [local::lib] for the approach to be taken.
So what can I do next?
Looking closer at the Cygwin’s setup-x86_64.exe, a search for “cpan” lists eight packages under the perl category for perl-CPAN-* and perl-Parse-CPAN*, which are all set to “Skip”. The package perl-CPANMeta: Perl distribution CPAN-Meta is version 2.150001-1 from cygwin.mirrors.pair.com. Since this is not installed yet, but the installed Perl5 has some knowledge of an old CPAN, I need to know if it is safe to install the latest and will it work with a space in my profile? Do I need to remove the old CPAN, and how?
You probably want to update to the latest version of ExtUtils::MakeMaker, recent versions contain various fixes for paths containing spaces. This should fix these issues.
I am trying to install perl modules using CPAN but CPAN seems to be crashing. It says there is an update that I can install (I'm running v1.960001) but after trying to run, it exits back to the command prompt:
cpan[1]> install CPAN
Going to read '/home/ubuntu/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Going to read '/home/ubuntu/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Tue, 04 Jun 2013 14:08:21 GMT
..............
New CPAN.pm version (v2.00) available.
[Currently running version is v1.960001]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
..............................................
ubuntu#ip-10-166-105-207:/home/www/cgi-bin$ sudo cpan
Terminal does not support AddHistory.
There seems to be running another CPAN process (pid 10592). Contacting...
Other job not responding. Shall I overwrite the lockfile '/home/ubuntu/.cpan/.lock'? (Y/n) [y]
When I try to get back into CPAN, it says that it's already running.
This happens when I try to update CPAN or install modules (like JSON).
Does anyone have any clues what might be going wrong?
I had the exact same problem on 14.04, and fixed it by adding a swapfile on the system, using the instructions located at: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04
CPAN of my Strawberry perl installation used to work fine. A while ago I installed Camelbox perl to get its GTK libraries. I fixed the PATHs to leave no trace of Camelbox, and added its libs PERL5LIB. This solved my GTK-on-Windows-7 problems.
Today, I had to use CPAN again, but it crashes inexplicably. It is the Strawberry CPAN that runs.
C:\Users\tim>cpan -v
C:\strawberry\perl\bin/cpan script version 1.9, CPAN.pm version 1.9402
When I try to get anything -- including already installed modules -- CPAN successfully deletes a temporary directory, and suddenly crashes.
cpan> get List::Object
Running get for module 'List::Object'
Checksum for C:\strawberry\cpan\sources\authors\id\M\MS\MSHILTONJ\List-Object-0.01.tar.gz ok
Scanning cache C:\strawberry\cpan\build for sizes
............................................................................DONE
DEL(1/1): C:\strawberry\cpan\build\tmp-16240
C:\Users\tim>
I get a generic Windows perl.exe has stopped working popup.
I'm fairly sure that this is caused by Camelbox. What can I do to fix or debug this? I've found no CPAN debug switches.
As daxim suggested, I ran cpan in the perl debugger. Here is the output as RAR (127 KB) and clear text (10.8 MB).
I fixed the PATHs to leave no trace of Camelbox, and added its libs PERL5LIB [to a Strawberry installation]
Your self-caused problem is on the C/object linking level. Mixing XS libraries for different versions of Perl is a bad idea.
Run the CPAN client under the Perl debugger, enable trace, continue until the crash happens. The Perl library that was loaded last hints you at the faulty link library. My gut suspects readline.
Crash occurs at Compress/Raw/Bzip2.pm line 63 which is XSLoader::load('Compress::Raw::Bzip2', $XS_VERSION);. This attempts to load the XS Bzip2 DLL whose exact name eludes me because I don't have a Strawberry installation around for checking. Reinstall this library without invoking the CPAN client, or try to hunt down all the pieces and delete them.
Clarification: I'm pretty much a
Perl/CPAN noob, don't assume I know
too much.
I have a pretty vanilla CPAN because I just rebuild my entire Lenny 5.0.2 VPS - so I pretty much have the default modules installed.
My eventual goal is to setup foswiki on my Apache 2.x based server.
So far I'm reading this guide and it says the first thing you should do is upgrade CPAN to the latest version. So I did (as su):
# perl -MCPAN -e '$ENV{FTP_PASSIVE} = 1; install CPAN'
Now, it's installing/updating a bunch of stuff, here's an excerpt:
CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Expect-1.00.tar.gz
CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-UnsatPrereq-1.00.tar.gz
CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CHECKSUMS
CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/cpantestdummies/
CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/cpantestdummies/CPAN-Test-Dummy-Perl5-Make-Features-1.05.tgz
CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/cpantestdummies/CHECKSUMS
CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Zip-1.03.zip
CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CHECKSUMS.2nd
CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-1.05.tar.gz
CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Failearly-1.02.tar.gz
CPAN-1.9402/t/CPAN/authors/id/A/AN/CHECKSUMS
CPAN-1.9402/t/CPAN/authors/id/A/CHECKSUMS
CPAN-1.9402/t/CPAN/authors/id/CHECKSUMS
CPAN-1.9402/t/CPAN/authors/01mailrc.txt
CPAN-1.9402/t/CPAN/CpanTestDummies-1.55.pm
CPAN-1.9402/t/CPAN/TestConfig.pm
CPAN-1.9402/t/51pod.t
CPAN-1.9402/t/02nox.t
CPAN-1.9402/t/50pod.t
CPAN-1.9402/t/10version.t
CPAN-1.9402/t/yaml_code.yml
CPAN-1.9402/t/04clean_load.t
CPAN-1.9402/README
CPAN: File::Temp loaded ok (v0.18)
CPAN.pm: Going to build A/AN/ANDK/CPAN-1.9402.tar.gz
Importing PAUSE public key into your GnuPG keychain... gpg: new configuration file `/root/.gnupg/gpg.conf' created
gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run
done!
(You may wish to trust it locally with 'gpg --lsign-key 450F89EC')
Checking if your kit is complete...
Looks good
Writing Makefile for CPAN
Could not read '/root/.cpan/build/CPAN-1.9402-fmK7xK/META.yml'. Falling back to other methods to determine prerequisites
ANDK/CPAN-1.9402.tar.gz
make -- NOT OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
kat:~#
I've searched Google and came across one page that said you should whenever possible install the package from aptitude/apt-get/yum, so I found a package named libyaml-perl, marked it for download, that went through fine.
Then I re-tried my initial command that installs the latest version of CPAN and ...
CPAN-1.9402/t/50pod.t
CPAN-1.9402/t/10version.t
CPAN-1.9402/t/yaml_code.yml
CPAN-1.9402/t/04clean_load.t
CPAN-1.9402/README
CPAN: File::Temp loaded ok (v0.18)
CPAN: YAML loaded ok (v0.66)
CPAN.pm: Going to build A/AN/ANDK/CPAN-1.9402.tar.gz
Importing PAUSE public key into your GnuPG keychain... done!
(You may wish to trust it locally with 'gpg --lsign-key 450F89EC')
Checking if your kit is complete...
Looks good
Writing Makefile for CPAN
ANDK/CPAN-1.9402.tar.gz
make -- NOT OK
Running make test
Can't test without successful make
Running make install
Make had returned bad status, install seems impossible
No clue what I should do now. Is there a way I can reset everything? Maybe I need to kill the file it tried to process so it can try to re-process it or something along those lines? If anyone else has general CPAN tips in addition to figuring out what this is, I'd be grateful.
Did I install the yaml package the right way?
Should I have done it from within CPAN?
What proper steps or modules should I get first?
Eventually I'll need to install these for foswiki:
CGI::Session - Needed for Foswiki's session feature which is really a must have
Error - Needed if you later want to develop plugins. It is also distributed with Foswiki but the author has experienced lots of trouble with the build script that builds plugins which sometimes cannot find this library. By adding it to the site Perl library you avoid this kind of trouble.
FreezeThaw - an indirectly needed module used by other modules.
GD - Used by the pluging that can produce graphics such as Foswiki:Plugins.ChartPlugin. It requires that lib gd is installed. If your choice of installation does not include you simply need to install the rpms gd and gd-devel. They are both on the CDs or DVD.
HTML::Tree - Needed by some popular plugins
Time-modules (Time::CTime, Time::DaysInMonth, Time::JulianDay, Time::ParseDate, Time::Timezone) also needed by some popular plugins.
Use debian's package management facilities to install: See instructions on the foswiki web site.
Stick with the platform-specific package management tools 99% of the time. Otherwise, configure CPAN to install in a separate directory (which you can add to $PERL5LIB).
What does o conf make in cpan shell say? Do you have make installed?
Generally, install build-essential (it's in ubuntu, so it should be also in Debian), and then do o conf init in cpan shell.
Consider using CPANPLUS (cpanp script) instead of CPAN.
Consider installing YAML before installing anything else.
Consider setting the configuration to follow prerequisites (that is, when some package requires some other module that is currently missing, it will go ahead and install the other module - recursively as necessary).