How can I install Perl modules without root privileges?
cpan, module, perl
Solution
See local::lib.
Once you have it installed, you can do:
`perl -MCPAN -Mlocal::lib -e 'CPAN::install(LWP)'`
Problem
I am on a Linux machine where I have no root privileges. I want to install some packages through CPAN into my home directory so that when I run Perl, it will be able to see it. I ran `cpan`, which asked for some coniguration options. It asked for some directory, which it suggested `~/perl` "for non-root users". Still, when I try to install a package, it fails at the `make install` step, because I don't have write access to `/usr/lib/perl5/whatever`. How can I configure CPAN so that I can install packages into my home directory?
Related problems
- How can I use CPAN as a non-root user?
- How can I install a CPAN module into a local directory?
- How do I install CPAN modules while using perlbrew?
- How can I use a new Perl module without install permissions?
- How do I tell CPAN.pm to install all modules in a specific directory?
- How can I install local modules with the cpan tool?
- Why does installing certain CPAN modules require root privilege?
- How can I install CPAN modules locally without root access (DynaLoader.pm line 229 error)?