Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

difficulty using CPAN.pm

by ybiC (Prior)
on Jul 25, 2000 at 12:24 UTC ( #24256=perlquestion: print w/ replies, xml ) Need Help??
ybiC has asked for the wisdom of the Perl Monks concerning the following question:

I'm finally stepping beyond the Perl standard distribution into the promised land of CPAN.   Or trying to, anyway - problems with make stop me dead in my tracks.

Found perl -MCPAN -e shell; syntax at Aighearach's good post My Favorite Module:CPAN, and got through FirstTime questions with only minor confusion.   But when I try to install any module or even to upgrade CPAN, the following errors result (after LWP loads and fetches):

Can't exec "/usr/bin/make":No such file or directory at -e line NNNN /usr/bin/make -- NOT OK Running make test Oops, make had returned bad status.
Jump back to "Favorite Module CPAN" post, which suggests the following action: "If make test fails, you can probably go to $HOME/.cpan/build and make install".   A few different variations on that all gen this error: *** No rule to make target `install'. Stop.  

PM search for CPAN turns up these nodes and more, but no answers.
perlman:lib:CPAN
perlman:CPAN::FirstTime
What's MakeMaker?

Can you tell I'm frazzled - even left the Monastery to search Deja.com and struck out.   <grin>

System I'm working on is
* Perl 5.00404
* Debian 2.1
* not behind firewall or proxy.
* /usr/bin/make v3.77

I humbly request illumination and edification from Wiser Monks Than I (TM)
    cpan-impaired,
    ybiC

Comment on difficulty using CPAN.pm
Download Code
Re: difficulty using CPAN.pm
by Corion (Pope) on Jul 25, 2000 at 12:38 UTC

    Well, I've never had problems with downloading and installing modules from CPAN as long as I was root and had all the other prerequisites.

    You yould try to manually (instead of using CPAN) install a module, that is, download the module file, unzip and untar it and then try to install it...

    The error message you are getting means that /usr/bin/make does not exist or is not executable. This is weird because Linux systems should have a working make utility and you even have a make program in /usr/bin. What you could try would be which make to see which make the shell thinks you want ... If this make is not /usr/bin/make then that's maybe one of the problems you have.

    Somehow I get the feeling that make itself is failing ... Please try manually installing a module by running perl Makefile.pl and after that make in the same directory - if that works, then the problem is with your setup. If that dosen't work either, the problem is somewhere else :-(

Re: difficulty using CPAN.pm
by davorg (Chancellor) on Jul 25, 2000 at 12:39 UTC

    I'd advise making sure that you can build and install modules manually before using CPAN.pm. Try going thru the following steps:

    • Download the gzip file for a module that you want from CPAN. Initially go for a pure-Perl module like the latest version of CGI.pm.
    • Unzip and untar the file.
    • Run thru the standard installation steps investigating any errors that you see:
      • perl Makefile.PL
      • make
      • make test
      • make install
    • Having successfully installed a pure Perl module, try it again with a XS-based module like HTML::Parser.
    • Once you've successfully built both types of module, try them again using CPAN.pm.
    --
    <http://www.dave.org.uk>

    European Perl Conference - Sept 22/24 2000, ICA, London
    <http://www.yapc.org/Europe/>
RE: difficulty using CPAN.pm (update == success)
by ybiC (Prior) on Jul 25, 2000 at 15:21 UTC
    Update: with accurate and timely advice from Corion and davorg, plus Chatterbox help from davorg and le, I had quite a bit of success with everything but CPAN.pm itself. Manual make/install of Net::Telnet::Cisco displayed pertinent errors that CPAN.pm kept hidden, which led me to successfull manual make/install (upgrade) of Net::Telnet, and then back to manual make/install of Net::Telnet::Cisco (this time successful).

    CPAN.pm being unusable might be result of Debian's down-rev Perl 5.004.04, or perhaps from the way Debian packages a few CPAN modules as .deb's.   Could easily be something specific to how my host is setup.   Other Monks of the Debian persuasion care to share their experiences?

    Update #2: another PM reference on installing modules:  (manually, not with cpan.pm)
    perlman:perlmodinstall

    Update #3: With young perlhopper's suggestion below, I took a closer look at /usr/lib/perl5/CPAN/Config.pm. This one works on a Debian host at work.   I'll compare with suspect Config.pm at home for diffs.   Also found that txt.gz files in $HOME/.cpan/sources/authors/ and modules/ had to be deleted after fixing incorrect urllist entry.

    Yes, I know I need to point my urllist to a mirror   <grin>   I just want to get this working first.

    $CPAN::Config = { 'build_cache' => q[0], 'build_dir' => q[/root/.cpan/build], 'cpan_home' => q[/root/.cpan], 'ftp' => q[/usr/bin/ftp], 'ftp_proxy' => q[ ], 'getcwd' => q[cwd], 'gzip' => q[/bin/gzip], 'http_proxy' => q[ ], 'inactivity_timeout' => q[0], 'index_expire' => q[1], 'inhibit_startup_message' => q[0], 'keep_source_where' => q[/root/.cpan/sources], 'lynx' => q[/usr/bin/lynx], 'make' => q[/usr/bin/make], 'make_arg' => q[], 'make_install_arg' => q[], 'makepl_arg' => q[], 'ncftp' => q[], 'no_proxy' => q[ ], 'pager' => q[/usr/bin/less], 'shell' => q[/bin/bash], 'tar' => q[/bin/tar], 'unzip' => q[], 'urllist' => [q[ftp://cpan.valueclick.com/CPAN]], 'wait_list' => [q[wait://ls6.informatik.uni-dortmund.de:1404]], }; 1; __END__
    Update #4: aaaaall better now   8^P  
    My ignorance of make and the CPAN.pm shell were source of all my grief.
    Solutions:
    = correct syntax and sequence for make.
    = proper configuration of /usr/lib/perl5/CPAN/Config.pm
    = valid urllist entry (CPAN mirror)
    = delete corrupt $HOME/.cpan/sources/*.txt.gz

    Mondo thanks to Corion, davorg, le, and young perlhopper for their help.   ++ all around.
        ybiC

    p.s. would this mess be worth sanitizing into a mini-FAQ?   Or better yet, just a brief addendum comment to Aighearach's excellent CPAN.pm FAQ.

      I run debian 2.1 and perl 5.00404 as well, and have had no trouble running the cpan module in shell mode. If you want to post or send me (mlogan@ccs.neu.edu) your 'Config.pm' file under the CPAN module directory, I will take a look at it and see if it differs from mine significantly.

      Good Luck,
      -Mark

        After it was all working, I made the mistake of following CPAN shell's suggestion of upgrading itself.   Any use of cpan.pm now results in a nasty zlibVersion error and rude return to host shell without closing the lock file.   :^(   CPAN.pm v1.54 apparantly requires Zlib 1.08, while Debian 2.1 provides Zlib 1.01.

        Upgrading Debian Zlib to v1.08 would also force an upgrade of 15 other .deb's, including apache, mailtools, and perl itself with all associated libs.   Needless to say, I'm not thrilled with that idea on a production host.

        Is there a cpan method for downgrading itself?

        Update: couple suggestions from young_perlhopper - install latest zlib (gzip?) to a non-default location, AND/OR rm cpan.pm and do a manual make/install.   Or, I may try copying CPAN.pm v1.202 from working Debian box at home.
            cheers,
            ybiC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2014-12-22 10:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (114 votes), past polls