Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Out of memory error while installing a perl package

by pxb5080 (Initiate)
on May 30, 2013 at 19:57 UTC ( [id://1036125]=perlquestion: print w/replies, xml ) Need Help??

pxb5080 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am trying to install Lingua-StanfordCoreNLP package on a 32 bit windows 7 machine using CPAN. I am not sure why I am getting this error:
CPAN: CPAN::SQLite loaded ok (v0.202) Database was generated on Wed, 29 May 2013 23:48:48 GMT Running install for module 'Lingua::StanfordCoreNLP' Running make for K/KA/KAL/Lingua-StanfordCoreNLP-0.10.tar.gz CPAN: Digest::SHA loaded ok (v5.84) CPAN: Compress::Zlib loaded ok (v2.06) Checksum for C:\strawberry\cpan\sources\authors\id\K\KA\KAL\Lingua-Sta +nfordCoreNLP-0.10.tar.gz ok CPAN: Archive::Tar loaded ok (v1.90) Out of memory!
My machine is a 8 GB machine and when I ran this command, at least 4GB was free. I have tried running it multiple times and every time I get the same error.

Can anyone please see why I am getting this error?

Replies are listed 'Best First'.
Re: Out of memory error while installing a perl package
by marto (Cardinal) on May 30, 2013 at 21:05 UTC

    I have a 32bit machine also running Strawberry Perl with 4GB of RAM. cpan seemed to be having difficulty extracting the .tar.gz file. I spent a long time maxing out one core of my very old dual core desktop. I decided to extract this file manually using 7zip. This was very quick. Perhaps the manual installation method would work. I don't have Inline::Java or Java SDK installed.

    Update: slight rewording.

      Can you please guide me how to install it manually?

        Sure, download (either via the command line or from Lingua::StanfordCoreNLP, though the latter is likely quicker) and extract to a directory (I used 7zip). Open a command prompt and change to the directory you created when extracting, e.g.:

        cd c:\LinguaStanfordCoreNLP

        Before going any further make sure you've installed Inline::Java. Now you essentially want to follow the installation process detailed in the Lingua::StanfordCoreNLP, apart from the slight differences for your platform:

        perl Build.PL Build Build test Build install

        Update: Slight rewording of the first sentence.

Re: Out of memory error while installing a perl package
by Riales (Hermit) on May 30, 2013 at 22:01 UTC
    Are you using cpanm to install the package? I think it uses a lot less memory than the CPAN shell.
      With cpanm also, I get the same error.
        Was this solved? I'm having the same problem.
Re: Out of memory error while installing a perl package
by DrHyde (Prior) on Jun 03, 2013 at 10:42 UTC

    On a 32 bit machine your processes are limited to addressing 4GB max, which the OS might then further reduce.

    But your real problem is that Archive::Tar is a big fat pig that makes very poor use of memory. Install a proper tar command and tell CPAN.pm where to find it:

    $ perl -MCPAN -eshell > o conf tar /usr/local/bin/tar (or whatever path is traditional on Windows) > o conf commit > quit

    This is why in CPAN::ParseDistribution there is a use_tar option.

    Incidentally, CPAN::ParseDistribution fails its tests on Windows, because of problems with forking and signals. If anyone thinks that they can fix it, patches are most welcome on Github. People saying "have you tried X Y and Z?", on the other hand, are not welcome, as I don't have a Windows licence, have no intention of getting one, and have no intention of learning how to drive Windows. If you think you can help, do please get in touch by email.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1036125]
Approved by marto
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-03-28 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found