Perl用CPAN安装模块时错误

提示不是root权限:

需要执行:o conf make_install_make_command 'sudo make'

来自动切换到root,但是还是会需要输入密码!!!

输出部分信息如下:

make: *** [pure_site_install] Error 13

  TIMB/DBI-1.634.tar.gz

  /usr/bin/make install  -- NOT OK

----

  You may have to su to root toinstall the package

  (Or you may want to run somethinglike

    o conf make_install_make_command'sudo make'

  to raise your permissions.Failedduring this command:

 TIMB/DBI-1.634.tar.gz                        : install NO

 

cpan[2]> o confmake_install_make_command 'sudo make'

    make_install_make_command [sudomake]

Please use 'o conf commit' to make the configpermanent!

cpan[2]> o conf commit

commit: wrote '/Users/it-0003005/.cpan/CPAN/MyConfig.pm'


原文地址:https://www.cnblogs.com/v-BigdoG-v/p/7398628.html