Install Perl modules using CPAN without Root access

22 Mar

Just need to set a few conf variables, you can do this when first setting up CPAN or if you already have:

$> perl -MCPAN -e shell
$> o conf                          # see current configuration
$> o conf makepl_arg  PREFIX=/somewhere/writable   # change the PREFIX
$> o conf make_install_arg INSTALLMAN3DIR=/somewhere/writable    # change where man's will go
$> o conf commit   # save

Now you should be able to do standard “install XML::XSLT” type commands and have all dependencies resolved etc.

Remember to include the /somewhere/writable path (@INC or lib) in your scripts.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: