perl -MCPAN -e shell
#Open a subshell in the DBD::mysql directory (will download the module if not already downloaded):
look DBD::mysql
#Execute any command as you would installing the module "manually":
perl Makefile.PL --testdb=test --testuser=root --testpassword=supersecret --testhost=localhost
make
make test
make install
Showing posts with label cpan. Show all posts
Showing posts with label cpan. Show all posts
Tuesday, September 15, 2009
Install DBD::mysql with CPAN
Sunday, July 20, 2008
用CPAN安装perl module
- 首先配置CPAN Module,方法是在bash下面运行
$ perl -MCPAN -eshell
配置过程会询问一些问题,其中CPAN的镜像可以选择http://cpan.linuxforum.net/。 - 接下来要更新CPAN Module,而不是直接装LWP。否则会遇到undefined subroutine &Digest::base::new之类的错误。方法是运行
cpan> install Bundle::CPAN
这一步是关键,切记切记。我开始不知道,还在网上搜索这个错误信息,发现有人说是Perl的问题,我就把整个Cygwin更新到1.5.19.4,结果啥用也没有,还把其它东西弄得一塌糊涂。 - 装好新的CPAN Module,先退出,然后再运行1里面的命令进入CPAN的shell,这时就可以装LWP了
cpan> install Bundle::LWP
安装Bundle::LWP意味着不仅安装LWP,而且安装它需要的其它module。
Subscribe to:
Posts (Atom)