我运行此命令安装mojolicious,我得到了下面的命令。不知道如何解决,请帮忙。
~$ sudo curl -L https://cpanmin.us | perl - -M https://cpan.metacpan.org -n Mojolicious
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 297k 100 297k 0 0 98815 0 0:00:03 0:00:03 --:--:-- 98825
!
! Can't write to /usr/local/share/perl/5.18.2 and /usr/local/bin: Installing modules to /home/foneworx/perl5
! To turn off this warning, you have to do one of the following:
! - run me as a root or with --sudo option (to install to /usr/local/share/perl/5.18.2 and /usr/local/bin)
! - Configure local::lib in your existing shell to set PERL_MM_OPT etc.
! - Install local::lib by running the following commands
!
! cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
答案 0 :(得分:1)
你sudo
你的文件下载(完全没用),但不要sudo Perl。 Perl是您需要提升以向系统授予写入权限的命令。
正确的命令行是:
curl -L https://cpanmin.us | sudo perl - -M https://cpan.metacpan.org -n Mojolicious
或者您可以使用常规的CPAN界面(我不熟悉cpanminus):
sudo perl -MCPAN -e 'install Mojolicious'