这是本文档旧的修订版!
CentOS 6.8 (64 bits)
> wget https://www.cpan.org/src/5.0/perl-5.30.0.tar.gz > tar -zxvf perl-5.30.0.tar.gz > cd perl-5.30.0 > ./Configure -des -Dprefix=/usr/local/perl -Dusethreads -Uversiononly > make > make install # re-link > mv /usr/bin/perl /usr/bin/perl.bak > ln -s /usr/local/perl/bin/perl /usr/bin/perl # To check the version > perl --version
> yum install perl-CPAN # 安装XML::Parser库下面这两个包 > yum install expat > yum install expat-devel
#To check whether an interested libary is installed or not perl -MClass::Struct -e "print\"model installed\n\""
The folling Perl libraries need to be installed:
Generally, the libraries Class::Struct, Getopt::Long, Getopt::Std, File::Basename, File::Spec, FindBin, IO::File, and POSIX are installed by default. One can install other libraries as follows.
> perl -MCPAN -e shell > install HTML::Entities > install XML::Parser > install XML::Twig > install XML::Writer > install XML::Writer::String
评论