http://www.perlmonks.org?node_id=1074454

DarkMorford has asked for the wisdom of the Perl Monks concerning the following question:

Greetings, wise ones!

I'm a non-privileged user on a development machine at work, and I'd like to install some modules for use in dev before asking the admin to install them system-wide. The machine is running Ubuntu 12.04.4 LTS (uname -a returns Linux dev-server 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux) and the system-installed Perl is v5.14.2. The local::lib module does not appear to be installed at the system level.

I launched cpan, allowed it to auto-configure itself, and chose local::lib for the install method. After auto-selecting its preferred mirrors, CPAN went ahead and bootstrapped itself, including building local::lib. However, at the end of the process, it prompts me with this:

local::lib is installed. You must now add the following environment va +riables to your shell configuration files (or registry, if you are on Windows) + and then restart your command line shell and CPAN before installing module +s: Would you like me to append that to /home/shawmo03/.bashrc now? [yes]

Regardless of whether I choose yes or no here, the next time I launch CPAN and try to install a module, it fails as such:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! ERROR: Can't create '/usr/local/man/man3' mkdir /usr/local/man/man3: Permission denied at /usr/share/perl/5.14/E +xtUtils/Install.pm line 494 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!

I've tried this a couple of times now, making sure to delete my ~/.cpan and ~/perl5 directories before configuring CPAN, but it steadfastly refuses to output the environment variables I need to set. Pray tell, O monks, what must I do to appease it?