Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Installing Modules Without Root

by listanand (Sexton)
on May 19, 2010 at 17:04 UTC ( [id://840741]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Installing Modules Without Root
in thread Installing Modules Without Root

By preferences file, do you mean ~/.cpan/CPAN/MyConfig.pm? I am not sure how it can interfere. I am posting the contents of MyConfig.pm below. Everything seems right to me...

$CPAN::Config = {

'build_cache' => q10,

'build_dir' => q/home/andy/perl5/build,

'cache_metadata' => q1,

'cpan_home' => q/home/andy/perl5,

'cpan_version_check' => q1,

'ftp' => q/usr/bin/ftp,

'ftp_proxy' => q[],

'getcwd' => qcwd,

'gpg' => q/usr/bin/gpg,

'gzip' => q/bin/gzip,

'histfile' => q/home/andy/perl5/histfile,

'histsize' => q100,

'http_proxy' => q[],

'inactivity_timeout' => q[0],

'index_expire' => q1,

'inhibit_startup_message' => q[0],

'keep_source_where' => q/home/andy/perl5/sources,

'lynx' => q/usr/bin/lynx,

'make' => q/usr/bin/make,

'make_arg' => q[],

'make_install_arg' => q[],

'makepl_arg' => qPREFIX=/home/andy/perl5,

'ncftp' => q[],

'ncftpget' => q[],

'no_proxy' => q[],

'pager' => q/usr/bin/less,

'prerequisites_policy' => qfollow,

'scan_cache' => qatstart,

'shell' => q/bin/bash,

'tar' => q/bin/tar,

'term_is_latin' => q1,

'unzip' => q/usr/bin/unzip,

'urllist' => [qftp://mirror.its.uidaho.edu/cpan/],

'wget' => q/usr/bin/wget,

};

1;

__END__

Replies are listed 'Best First'.
Re^4: Installing Modules Without Root
by Your Mother (Archbishop) on May 19, 2010 at 18:47 UTC

    That does look good but I think the advice stands. Strangely enough I just had to go through this on the weekend so I have a "better" set of tips:

    • Unset/clear all perl ENV entries: env | grep -i perl and clear them all out
    • rm -rf ~/.cpan
    • rm -rf ~/.cpanplus
    • rm -rf ~/perl
      • And maybe: rm -rf ~/perl5 for good measure; clean start
    • Start over: cd ; rm -rf local-lib*
    • lwp-download http://URL-to... local::lib Download link
    • tar xpfvz local-lib*
    • cd local-lib...
    • perl Makefile.PL --bootstrap
    • make test && make install
    • Follow the "bootstrapping" advice about how to get the new stuff visible in your shell. You might have to manually edit the .rc file of your shell of choice to make sure you don't have duplicate declarations.
      • This provides those in whatever dialect your shell is: cd ; perl -Iperl5/lib/perl5 -Mlocal::lib
    • source .yourshrc
    • Go, go, go.

    Then I highly recommend installing App::cpanminus and favoring its cpanm over cpan or cpanp. It's much lighter and quicker than the others.

    • cpan -i App::cpanminus
    • rehash
    • Take it for a tour and get lots of goodies: cpanm Task::Kensho or just a quick spin around the block to see it work at doing nothing in particular: cpanm Nothing::Tiny
      Thank you so much for the detailed instructions !

      But, life is not so simple :) I got as far as doing "perl Makefile.PL --bootstrap". Towards the end, I get the error below.

      By the way, don't I have to configure CPAN before running makefile.pl? When I try going to CPAN shell, and running one of the 2 selected commands below, it seems like, I will need to configure all other parameters also...

      ==Error Begin==

      You have not configured a urllist and do not allow connections to the internet to get a list of mirrors. If you wish to get a list of CPAN mirrors to pick from, use this command

      o conf init connect_to_internet_ok urllist

      If you do not wish to get a list of mirrors and would prefer to set your urllist manually, use just this command instead

      o conf init urllist

      ==Error End==

        Oh and by the way, is it "perl Makefile.PL --bootstrap" or "perl Makefile.PL --bootstrap=/my_dir"?
Re^4: Installing Modules Without Root - Need help ASAP !
by listanand (Sexton) on May 19, 2010 at 18:28 UTC
    OK, so now it's official. After days and days of fiddling with this, I am totally flustered and losing patience :( Installing modules should in no way be this hard.

    I finally removed (renamed) my .cpan directory, renamed ~perl and ran "perl -MCPAN -e shell" with default parameters (did not change any directories). Then from the local::lib download directory, I ran " perl Makefile.PL --bootstrap=/my_directory_of_choice" and it was OK. Then I ran "make test && make install" and it was OK too. Then I did "echo 'eval $(perl -I/my_directory_of_choice/lib/perl5 -Mlocal::lib=my_directory_of_choice)' >>~/.bashrc

    After this, I go to CPAN shell, and try to install a module by saying " install Acme::Time::Baby " and I get the error below.

    I will really appreciate help on this. I have been at it for days now, and have been able to get NOTHING done because of this :(

    Thanks in advance.

    Andy

    PS: However when I do "source ~/.bashrc" it says that "Can't open perl script "Mlocal::lib=/my_directory_of choice": No such file or directory"

    ==Error Begin==

    Running make install

    mkdir /usr/local/lib/perl: Permission denied at /usr/share/perl/5.8/ExtUtils/Install.pm line 112

    make: *** pure_site_install Error 13

    /usr/bin/make install -- NOT OK

    == Error End ==

      Don't move, restart a half-done try, change, or edit anything. Follow the steps in Re^4: Installing Modules Without Root exactly. Blank slate.

      I just ran through the steps on a fresh machine with 5.8.8 and it worked perfectly. Unless I'm forgetting something they also worked perfectly on two other machines with different *nixes this weekend; both of which were causing problems on the "simple" install procedure in the Pod. You're almost there! And it's (typically) smooth sailing after you get it going.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-18 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found