Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: How to install modules for local perl without changing anything on system perl?

by jcb (Parson)
on Dec 23, 2015 at 23:38 UTC ( [id://1151086]=note: print w/replies, xml ) Need Help??


in reply to [Solved]: How to install modules for local perl without changing anything on system perl?

A method for this that I've used in the past is to have an account other than root for building software (then only run the install step as root). If you have (or can make) such an account, simply chown -R not-root /opt/apps/perl/perl5220, run the CPAN tools as not-root, and see if it works.

Since you are not running the install as root, it will fail if an attempt is made to write to the system perl, and you can be confident that, at worst, only the app perl that you were trying to change can be messed up.

Afterwards, chown -R root /opt/apps/perl/perl5220 will put things back the way they were.

Unless, of course, /opt/app/perl/perl5220 is already owned by an account other than root, in which case you can avoid the chown dance and can simply run the CPAN tools under that account, where they will not be allowed to touch the system perl.

A final caveat: This assumes that the system perl is owned by root. If the system perl is not owned by root, then you will need to figure out who changed that and why.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2024-05-25 20:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found