Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Why won't local::lib tell me what to put in .bashrc?

by DarkMorford (Novice)
on Feb 11, 2014 at 17:17 UTC ( #1074454=perlquestion: print w/replies, xml ) Need Help??
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/ 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?

Replies are listed 'Best First'.
Re: Why won't local::lib tell me what to put in .bashrc?
by marto (Bishop) on Feb 11, 2014 at 17:20 UTC

    Have you tried running .bashrc:

    . .bashrc

    or logging out then back in?

    Update: Consult the local::lib documentation regarding what exactly you should check for in .bashrc.

      I have logged out and back in, and it hasn't changed anything. For whatever reason, the local::lib bootstrap process is falsely determining that nothing needs to be added to .bashrc to set up the environment. While I have the monks for guidance, other users might not be so lucky and wind up confused when CPAN claims it's set up correctly but fails to install anything.

        So did you add anything to .bashrc and get this working? If we can first of all resolve your issues, we can then investigate problems with local::lib and provide a patch if required so that others get the benifit.

Re: Why won't local::lib tell me what to put in .bashrc?
by wjw (Curate) on Feb 11, 2014 at 17:29 UTC
    Try using Perlbrew. Might solve a lot of those problems.

    It is very simple to use and relieves both you and your admin of some of the sticky issues. I am guessing your admin would be for it too.

    ...the majority is always wrong, and always the last to know about it...
    Insanity: Doing the same thing over and over again and expecting different results.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1074454]
Approved by marto
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2017-05-26 04:54 GMT
Find Nodes?
    Voting Booth?