当前位置: 首页 > 工具软件 > CPAN > 使用案例 >

cpan安装perl module的方法和步骤(备忘帖)

柳奇希
2023-12-01

适用场景:不具备root权限且没有sudo权限的普通用户安装perl module
安装步骤:
1)
删除/.cpan/.lock
rm -rf /home/users/.cpan/.lock
2)进入cpan交互模式
perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v2.00)
Enter 'h' for help.

cpan[1]> o conf mbuildpl_arg "--install_base /home/USER/extra_lib/"
    mbuildpl_arg       [--install_base /home/USER/extra_lib/]
Please use 'o conf commit' to make the config permanent!


cpan[2]>  o conf makepl_arg "PREFIX=/home/USER/extra_lib/"
    makepl_arg         [PREFIX=/home/USER/extra_lib/]
Please use 'o conf commit' to make the config permanent!


cpan[3]> install JSON

转载于:https://www.cnblogs.com/gracejiang/p/6808215.html

 类似资料: