If you don't have permission to install a Perl module into the system Perl directories, you will not be able to use CPAN or yum or atp-get etc to install the module. You have to manually install it. Here are the steps:
- Download the module's package from search.cpan.org
- Install the package:
$ tar zxf module-name.tgz
$ cd module-name
$ perl Makefile.PL PREFIX=/your-custom-dir
$ make
$ make test
$ make install - Set the environment variable to extending the library path -
open your $HOME/.bashrc, and add the following line:
PERL5LIB=/home/path/lib:/usr/another/path/lib; export PERL5LIB
- Test your installation and environment setup:
$ PERL5LIB=/home/path/lib:/usr/another/path/lib; export PERL5LIB
$ perl -e 'use module-name'If you don't see any error message, you have successfully installed and configured the Perl module in a local custom location.
Comments
Post new comment