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


in reply to Re: Installed CPAN Modules in Problematic Location
in thread Installed CPAN Modules in Problematic Location

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.
  • Comment on Re^2: Installed CPAN Modules in Problematic Location

Replies are listed 'Best First'.
Re^3: Installed CPAN Modules in Problematic Location
by Anonymous Monk on May 31, 2016 at 20:59 UTC
    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!