IIRC you probably have a ~/perl or a CPAN preferences file that is interfering, or both. Google around a little before just deleting those but I recognize the error you're getting and I *think* that's how I solved it before.
(update: I apparently replied to my own node instead of Re^2: Installing Modules Without Root.)
| [reply] [d/l] |
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__
| [reply] |
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
| [reply] [d/l] [select] |
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 ==
| [reply] |
OK, so now I am trying to use local::lib to install the modules. However as soon as I run the command " perl Makefile.PL --bootstrap=/my_directory_of_choice" , I get the following message:
Any suggestions?
== Error Begin ==
*** Checking for Perl dependencies...
Core Features
- ExtUtils::MakeMaker ...too old. (6.30_01 < 6.31)
- ExtUtils::Install ...too old. (1.33 < 1.43)
- ExtUtils::CBuilder ...missing.
- ExtUtils::ParseXS ...missing.
- Module::Build ...missing. (would need 0.28)
- CPAN ...too old. (1.7602 < 1.82)
==> Auto-install the 6 mandatory module(s) from CPAN? y y
*** Dependencies will be installed the next time you type 'make'.
(You may need to do that as the 'root' user.)
*** Module::AutoInstall configuration finished.
*** Installing dependencies...
*** You are not allowed to write to the directory '/usr/local/share/perl/5.8.8';
the installation may fail due to insufficient permissions.
==> Should we try to re-execute the autoinstall process with 'sudo'? y y
*** Trying to re-execute the autoinstall process with 'sudo'...
Password:
=Error End== | [reply] |