Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Unable to install Tk module

by rkrasowski (Sexton)
on Jul 12, 2012 at 16:42 UTC ( [id://981436]=perlquestion: print w/replies, xml ) Need Help??

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

Interesting, I tried to install Tk and that is what I got:

cpan[1]> install Tk Going to read '/home/ubuntu/.cpan/Metadata' Database was generated on Thu, 12 Jul 2012 01:19:03 GMT Running install for module 'Tk' Running make for S/SR/SREZIC/Tk-804.030.tar.gz Checksum for /home/ubuntu/.cpan/sources/authors/id/S/SR/SREZIC/Tk-804. +030.tar.gz ok Scanning cache /home/ubuntu/.cpan/build for sizes ...................................................................... +......DONE CPAN.pm: Going to build S/SR/SREZIC/Tk-804.030.tar.gz Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=s +ite] 'YAML' not installed, will not store persistent state SREZIC/Tk-804.030.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install Could not read metadata file. Falling back to other methods to determi +ne prerequisites Failed during this command: SREZIC/Tk-804.030.tar.gz : writemakefile NO '/usr +/bin/perl Makefile.PL INSTALLDIRS=site' returned status -1 cpan[2]>

I tried on different computer and got similar response.
It is Ubuntu 12.04. Any idea what is the problem?
Thanks like always
Robert

Replies are listed 'Best First'.
Re: Unable to install Tk module
by Anonymous Monk on Jul 12, 2012 at 16:46 UTC

    The problem is, in all that stuff you posted, there is not a single relevant error message

    Do  cpanp -i Tk and if that fails,  cpanp -z Tk then  make realclean then post the output of perl Makefile.PL && make

      well, I did apt-get install perl-tk and I got the module installed and working fine. Robert

      Well, the same problem with module Math::NumberCruncher

      I did cpanp -i Math::NumberCruncher and that is what I got:

      ubuntu@omap:~$ cpanp -i Math::NumberCruncher Installing Math::NumberCruncher (5.00) Use of chdir('') or chdir(undef) as chdir() is deprecated at /usr/lib/perl/5.14/Cwd.pm line 338. Running /usr/bin/perl /usr/bin/cpanp-run-perl /home/ubuntu/.cpanplus/5.14.2/build/Math-NumberCruncher-5.00/Makefile.PL INSTALLDIRS=site... ERROR Could not run '/usr/bin/perl Makefile.PL': -- cannot continue ERROR Dir '' does not exist Key 'dir' () is of invalid type for 'CPANPLUS::Internals::Utils::_chdir' provided by CPANPLUS::Dist::MM::prepare at /usr/share/perl/5.14/CPANPLUS/Dist/MM.pm line 435 ERROR Could not chdir back to start dir '' ERROR Unable to create a new distribution object for 'Math::NumberCruncher' -- cannot continue *** Install log written to: /home/ubuntu/.cpanplus/install-logs/Math-NumberCruncher-5.00-1342196241.log Error installing 'Math::NumberCruncher' Problem installing one or more modules

      Running cpanp -z gave me this kind of response:

      ubuntu@omap:~$ cpanp -z Math::NumberCruncher Use of chdir('') or chdir(undef) as chdir() is deprecated at /usr/lib/perl/5.14/Cwd.pm line 338. Error executing your subshell '/bin/bash': Cannot allocate memory ERROR Dir '' does not exist Key 'dir' () is of invalid type for 'CPANPLUS::Internals::Utils::_chdir' provided by CPANPLUS::Shell::Default::_shell at /usr/share/perl/5.14/CPANPLUS/Shell/Default.pm line 811

      I tried sudo apt-get install perl-Math::NumberCruncher and:

      ubuntu@omap:~$ sudo apt-get install perl-Math::NumberCruncher Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package perl-Math::NumberCruncher

      Any idea what is the problem?? Thanks

      Robert

        Any idea what is the problem?? Thanks

        This >>> '/bin/bash': Cannot allocate memory

        your account appears to have memory limits, talk to your admin

Re: Unable to install Tk module
by ckj (Chaplain) on Jul 12, 2012 at 18:43 UTC
    Well try to install YAML first then run your command i.e. install Tk. I am working on windows and I used to run this to install Tk:
    (For 32 bit) ppm install http://www.bribes.org/perl/ppm/Tk.ppd (For 64 bit) ppm install http://www.bribes.org/perl/ppm64/Tk.ppd
    So instead of ppm install you should use apt-get install. In extreme case, if this doesn't work then I'll suggest to download the package from cpan and run following:
    perl Makefile.PL make make test make install
    I think that much is enough but in case if you need more help please read Install file inside that package file
      For Windows there are 2 txt files in the sources: for Strawberry and for ActivePerl.

      The steps for ActivePerl would be: (I just installed the latest Tk this way instead of an older available via pod version)

      in Visual Studio 2010 (I'm using VS2010-Express) prompt:

      perl Makefile.PL nmake nmake test nmake install_perl

Log In?
Username:
Password:

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

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

    No recent polls found