简体   繁体   中英

Installing perl module without sudo access

The module in question is Geo::IP::PurePerl and this is what I'm doing:

wget http://search.cpan.org/CPAN/authors/id/B/BO/BORISZ/Geo-IP-PurePerl-1.24.tar.gz
tar -zxf Geo-IP-PurePerl-1.24.tar.gz
cd Geo-IP-PurePerl-1.24
perl Makefile.PL
make
make test
sudo make install

However, I don't have sudo access and just make install results in the following error:

[~/perl/Geo-IP-PurePerl-1.24]# make install
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/usr/bin'
Do not have write permissions on '/usr/bin'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 at -e line 1
make: *** [pure_site_install] Error 13

Is there any way to get around this?

I doubt there is any way to install a Perl module to the native system installation of Perl.

In the past I have had to install a new, completely independent version of perl in a directory that I do have write permission over and then ensure that my .profile file links my path to that location. Then whenever I call perl I'm accessing the local install area where I have full write access to.

Try:

perl Makefile.PL PREFIX=~/perllib

of course then you will have to add that path to your @INC include path...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM