Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Installed CPAN Modules in Problematic Location

by tonto (Friar)
on Nov 10, 2015 at 18:38 UTC ( #1147378=note: print w/replies, xml ) Need Help??

in reply to Installed CPAN Modules in Problematic Location

I have a Centos 7 VPS (OpenVZ) and a Centos 7 VM (in VMWare Workstation), both 64 bit. I checked @INC on both and got identical results:

@INC: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .

I use cpanminus to install modules. You can find that on the How to Install CPAN modules page. It doesn't require any setup.

Before you start deleting things, I think you should check @INC. You can do that by entering "perl -V" in a terminal. If that root location is in @INC, I think you'll have to remove it from there before you delete anything.

Of course, Centos recommends that you use their repos to install modules but you've probably installed your own perl so you don't want to do that?

I hope this is at least a little help.

Replies are listed 'Best First'.
Re^2: Installed CPAN Modules in Problematic Location
by Anonymous Monk on Nov 13, 2015 at 23:30 UTC
    The CPAN configuration program now defaults the installation location to local (lib::local or such. Choose the second option (sudo) for a system-wide install.
      On a new Centos 7 machine, I found that "yum install cpan" caused some lines to be added to ~root/.bashrc which set the Perl environment variables to use a local installation path, rather than the system-wide path. I removed those lines, removed ~root/perl5 and ~root/.cpan, logged out, and logged back in. Then I ran through the whole cpan setup again, and it worked fine, using the system-wide locations for Perl module installation.
        solution worked the first try !!
        That's it. The perfect answer that worked like a charm. Thank you!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1147378]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2021-04-12 12:44 GMT
Find Nodes?
    Voting Booth?

    No recent polls found