perl的安装和版本切换工具-perlbrew

setenv PERL /opt/perl5 --设置新perl的起始安装路径

curl -kL http://install.perlbrew.pl | bash

source /opt/perl5/perlbrew/etc/bashrc

perlbrew init

perlbrew root (/opt/perl5/perlbrew) is initialized.

Append the following piece of code to the end of your ~/.bash_profile and start a

new shell, perlbrew should be up and fully functional from there:

source ~/perl5/perlbrew/etc/bashrc

Simply run `perlbrew` for usage details.

Happy brewing!

perlbrew install perl-5.16.0

perlbrew switch perl-5.16.0

至此,当前perl已经切换到新安装的perl-5.16.0

如果想再切换回旧版的,

source /opt/perl5/perlbrew/etc/bashrc

perlbrew switch-off

perl -v 查看当前版本已经切回。

完毕!

参考:http://perlbrew.pl/

上一篇:Prettier来统一代码风格


下一篇:TensorFlow-Bitcoin-Robot:一个基于 TensorFlow LSTM 模型的 Bitcoin 价格预测机器人