Can't locate local/lib.pm in @INC at /usr/share/perl/5.14/CPAN/FirstTime.pm

前端 未结 3 2014
既然无缘
既然无缘 2021-02-08 18:06

I am trying to use Perl the first time on my system which is Ubuntu 12.04. I have Perl v.5.14.2 installed.
I looked up how to install Perl modules, so I sta

3条回答
  •  生来不讨喜
    2021-02-08 18:48

    The local namespace was for your own personal modules and wouldn't be found in CPAN. This is something relatively new. At many sites, you might need CPAN modules not in the current version of Perl, or you need a newer version of a particular module. However, you don't have write access to the standard location where CPAN modules are installed.

    What this is doing is installing these modules under the $HOME/perl5/lib/local directory where you'll be able to access them. You would also need to setup a PERL5LIB environment variable (usually in your startup scripts), so Perl will check this directory when locating these modules.

    If you have sudo privileges, use that to install CPAN modules rather than trying this. The following will install the Foo::Bar module into the standard module directory for you (and do any configuration as necessary):

    $ sudo cpan install Foo::Bar
    

    If CPAN needs to be configured, it will do that first.

    There are complete directions on doing the local::lib install for modules on MetaCPAN. They're pretty clear.

提交回复
热议问题