perl包的安装
2020-09-10 本文已影响0人
wo_monic
没有学习过perl语言,但是某些程序需要使用perl,就总结perl的一些包的安装方法
在cpan https://metacpan.org/ 搜索对应的包的名称
选择有黄色方框链接。
在左边找到Download下载源码

下载完成后。
tar -zxvf DBI-1.643.tar.gz
cd DBI-1.643
perl Makefile.PL
make
make test
make install
如果是非root权限,需要指定目录。
pecify the installation into ~/perl5
cd perl-module/
perl Makefile.PL PREFIX=~/perl5
make
make test
make install
echo 'export PERL5LIB="$HOME/perl5/:$PERL5LIB" '>>~/.bashrc
更多非root安装perl包的方法,见参考
如果是Ubuntu,且是root,可以直接使用apt安装
apt-get install libswitch-perl