Ubuntu安装perl模块步骤

Ubuntu安装perl模块步骤:

按装cpan:

$ sudo perl -MCPAN -e install Spiffy (用此命令第一次安装任意模块时都会先把cpan装上)

后面安装perl模块:

$ sudo cpan install DBI

验证是否安装成功

$ perl -e 'use DBI' (没报错即成功)

perl模块也可从网上下载好编译安装

下载网址:http://search.cpan.org/ (可搜索所有perl模块)

下载后安装步骤(以Spiffy为例)

$ tar zxfv Spiffy-0.40.tar.gz

$ cd Spiffy-0.40

$ perl Makefile.PL

$ make

$ sudo make install

安装后有可能需要拷下它的pm库

可以先locate一下路径

$ sudo locate Spiffy

$ sudo cp /root/perl5/lib/perl5/Spiffy.pm /usr/lib/perl5/

如XML-Parser库等需要将pm库前的目录也拷下

$ sudo locate XML/Parser.pm

$ sudo cp -r /root/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/XML /usr/lib/perl5/

cpan Proxy authentication needed

解决辦法:

cpan

> o conf proxy_user ming\zhi.yang

> o conf proxy_pass 123456

> o conf commit

>q

本文出自 “linux” 博客,谢绝转载!

Database error: [Table 'ac_search_cache' is marked as crashed and should be repaired]

SELECT * FROM ac_search_cache WHERE hash = '8d18b27bb0be7b080cdca1acd3b7a4094d11afe3' LIMIT 1;