下载/编译/安装
$ su
$ wget http://www.cpan.org/src/5.0/perl-5.25.0.tar.gz
$ mkdir /usr/local/perl
$ tar zxvf perl-5.25.0.tar.gz -C /usr/local/perl
$ cd /usr/local/perl/perl-5.25.0
$ ./Configure -des -Dprefix=/usr/local/perl -Dusethreads -Uversiononly
$ make
$ make install
$ perl -version
撤除旧版本
$ cd /usr/bin
$ mv perl perl.old
$ ln -s /usr/local/perl/bin/perl /usr/bin/perl
DBI 安装
$ wget http://www.cpan.org/modules/by-module/DBD/DBI-1.636.tar.gz
$ gzip -d DBI-1.636.tar.gz
$ tar xvf DBI-1.636.tar
$ cd DBI-1.636
$ perl Makefile.PL
$ make
$ make test
$ make install
测试
$ ./test.pl
将以下存成 test.pl
#!/usr/bin/perl
use strict;
use ExtUtils::Installed;
print "Start Test ----\n";
my $inst = ExtUtils::Installed->new();
print join "\n",$inst->modules();
print "\n";
没有评论:
发表评论