Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

cpan trouble, where to start?

by PerlPeer (Novice)
on Jan 09, 2013 at 05:17 UTC ( #1012379=perlquestion: print w/ replies, xml ) Need Help??
PerlPeer has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have trouble with downloading and installing cpan modules. I cannot find a solution since I do not understand my problem.
Basic info:
UNIX, on mac os x 10.6.8 and running the terminal for command line.
v5.10.0 built for darwin-thread-multi-2level

Following guidance on the cpan site, I tried to first install cpanminus :
miya-saiko-no-iMac:~ arend$ cpan App::cpanminus
CPAN: Storable loaded ok (v2.18) Going to read /Users/arend/.cpan/Metadata Database was generated on Tue, 08 Jan 2013 07:07:36 GMT Running install for module 'App::cpanminus' Running make for M/MI/MIYAGAWA/App-cpanminus-1.5019.tar.gz CPAN: Digest::SHA loaded ok (v5.45) CPAN: Compress::Zlib loaded ok (v2.008) Checksum for /Users/arend/.cpan/sources/authors/id/M/MI/MIYAGAWA/App-c +panminus-1.5019.tar.gz ok CPAN: Archive::Tar loaded ok (v1.38) App-cpanminus-1.5019/ App-cpanminus-1.5019/bin/ App-cpanminus-1.5019/Changes App-cpanminus-1.5019/lib/ App-cpanminus-1.5019/Makefile.PL App-cpanminus-1.5019/MANIFEST App-cpanminus-1.5019/META.json App-cpanminus-1.5019/META.yml App-cpanminus-1.5019/README App-cpanminus-1.5019/t/ App-cpanminus-1.5019/t/happy_cpantesters.t App-cpanminus-1.5019/lib/App/ App-cpanminus-1.5019/lib/App/cpanminus.pm App-cpanminus-1.5019/bin/cpanm CPAN: File::Temp loaded ok (v0.18)
first trouble:
CPAN.pm: Going to build M/MI/MIYAGAWA/App-cpanminus-1.5019.tar.gz Checking if your kit is complete... Looks good Warning: prerequisite ExtUtils::Install 1.46 not found. We have 1.44. Warning: prerequisite Module::Build 0.36 not found. We have 0.280801. Writing Makefile for App::cpanminus Could not read '/Users/arend/.cpan/build/App-cpanminus-1.5019-wGrBPa/M +ETA.yml'. Falling back to other methods to determine prerequisites ---- Unsatisfied dependencies detected during ---- ---- MIYAGAWA/App-cpanminus-1.5019.tar.gz ---- Module::Build [requires] ExtUtils::Install [requires] Shall I follow them and prepend them to the queue of modules we are processing right now? [yes]
Selecting "yes":
Shall I follow them and prepend them to the queue of modules we are processing right now? [yes]
results in more and more demands for necessary modules that if "followed" by selecting "yes" repeatedly, finally end with:
CPAN.pm: Going to build Y/YV/YVES/ExtUtils-Install-1.54.tar.gz Checking if your kit is complete... Looks good Writing Makefile for ExtUtils::Install Could not read '/Users/arend/.cpan/build/ExtUtils-Install-1.54-Zdx4FY/ +META.yml'. Falling back to other methods to determine prerequisites make: *** No rule to make target `/System/Library/Perl/5.10.0/darwin-t +hread-multi-2level/CORE/config.h', needed by `Makefile'. Stop. YVES/ExtUtils-Install-1.54.tar.gz make -- NOT OK Warning (usually harmless): 'YAML' not installed, will not store persi +stent state Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Running make for M/MI/MIYAGAWA/App-cpanminus-1.5019.tar.gz Has already been unwrapped into directory /Users/arend/.cpan/build/A +pp-cpanminus-1.5019-XCFbKl CPAN.pm: Going to build M/MI/MIYAGAWA/App-cpanminus-1.5019.tar.gz Warning: Prerequisite 'ExtUtils::Install => 1.46' for 'M/MI/MIYAGAWA/A +pp-cpanminus-1.5019.tar.gz' failed when processing 'Y/YV/YVES/ExtUtil +s-Install-1.54.tar.gz' with 'make => NO'. Continuing, but chances to +succeed are limited. Warning: Prerequisite 'Module::Build => 0.36' for 'M/MI/MIYAGAWA/App-c +panminus-1.5019.tar.gz' failed when processing 'L/LE/LEONT/Module-Bui +ld-0.4003.tar.gz' with 'make => NO'. Continuing, but chances to succe +ed are limited. make: *** No rule to make target `/System/Library/Perl/5.10.0/darwin-t +hread-multi-2level/CORE/config.h', needed by `Makefile'. Stop. MIYAGAWA/App-cpanminus-1.5019.tar.gz make -- NOT OK Warning (usually harmless): 'YAML' not installed, will not store persi +stent state Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Could not read '/Users/arend/.cpan/build/ExtUtils-ParseXS-3.18-6oCmHR/ +META.yml'. Falling back to other methods to determine prerequisites miya-saiko-no-iMac:~ arend$
Does anyone have an idea? Since ExtUtils is not by far the only module in the wrong version I wonder if there is something wrong with the general perl installation?


Ok, it seems to have to do something with installation on mac os x....will post a new thread on this soon when I know what to ask

Comment on cpan trouble, where to start?
Select or Download Code
Re: cpan trouble, where to start?
by 0day (Sexton) on Jan 09, 2013 at 05:51 UTC
    Do you start it with root privilege?
      I don't know if I started with root privilege. I do have it, that means, I can install whatever I want, just need to give my PW.

        sudo su might help.

        Regards, Karl

        «The Crux of the Biscuit is the Apostrophe»

Re: cpan trouble, where to start?
by Anonymous Monk on Jan 09, 2013 at 08:44 UTC
    Try  curl -L http://cpanmin.us | perl - --self-upgrade
      Hi, I ran your command, and it started nicely, but than ran in trouble.
      The first problem seems to be a path setting:
      % Total % Received % Xferd Average Speed Time Time Time + Current Dload Upload Total Spent Left + Speed 100 327k 100 327k 0 0 93034 0 0:00:03 0:00:03 --:--: +-- 175k You are running cpanm from the path where your current perl won't inst +all executables to. Because of that, cpanm --self-upgrade won't upgrade the version of cpa +nm you're running. cpanm path : - Install path : /usr/local/bin It means you either installed cpanm globally with system perl, or use +distro packages such as rpm or apt-get, and you have to use them again to upgrade cpanm. ! ! Can't write to /Library/Perl/5.10.0 and /usr/local/bin: Installing m +odules to /Users/arend/perl5 ! To turn off this warning, you have to do one of the following: ! - run me as a root or with --sudo option (to install to /Library/P +erl/5.10.0 and /usr/local/bin) ! - Configure local::lib your existing local::lib in this shell to s +et PERL_MM_OPT etc. ! - Install local::lib by running the following commands ! ! cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/per +l5/lib/perl5/ -Mlocal::lib) !
      After that it detects a shipload of non present dependencies that eventually fail.
      Every time is referred to /Users/arend/.cpanm/build.log (not copied here, but if you want it I'll put it in)

      I did not do the perl installation on my computer. It was already available when I started using my mac.
      But perhaps best to start with fixing the path problem?
      The terminal suggests several options. How should I approach the problem?
        Don't mess with the system perl then, install your own as marto advises
Re: cpan trouble, where to start?
by marto (Chancellor) on Jan 09, 2013 at 09:39 UTC

    I suggest that you leave the system Perl for the system to use, and install your own elsewhere. One of the reasons for suggesting this is that people messing around with the system perl can find their systems unstable, or even unusable. I seem to recall Apple themselves wrecked the system Perl when upgrading some modules, resulting in unstable machines.

    You can use perlbrew or the manual installation instructions in README/INSTALL.

      Thanks for the advice!
      I figured it would be a simple update, not a complete system remodeling (which is far above my capabilites).
      I am reading up about perlbrew now.
      I probably return with questions about this in the near future.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2014-10-25 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (141 votes), past polls