Perl: 5.8.6
about 2005-10-13 晚10:30分:
shell> perl -MCPAN -e shell
cpan> install DBI
................
cpan> install DBD::mysql
提示错误信息,like this:
......
Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mysql_config. Resorting to guessed values!
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
......
猜测估计是根据PATH找不到mysql_config的原因,知道mysql_config在/home/mysql/bin下后,
shell> PATH=/home/mysql/bin:$PATH; export PATH
再度安装
......
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/home/mysql/include/mysql
embedded (mysql_config) =
libs (mysql_config) = -L/home/mysql/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testsocket (default ) =
testuser (default ) =
......
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00base.............install_driver(mysql) failed: Can't load '/root/.cpan/build/DBD-mysql-3.0002/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.14: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.6/i386-linux-thread-multi/DynaLoader.pm line 230.
......
Failed 19/20 test scripts, 5.00% okay. 863/866 subtests failed, 0.35% okay.
make: *** [test_dynamic] Error 255
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
......
又出错,不禁感叹搞乜啊又,好我从CPAN下载DBD-mysql-3.0002,看INSTALL.html文档,修改config,
进行手动安装,出错信息一样,晕!!我 google 再 google
-------------------------------------------------------------------------------------
about 2005-10-13 晚11:30分:
没法了,升级perl看看,下载perl5.8.7, 编译安装...漫长的等待...
顺利升级,好,再安装DBD
......
make: *** [test_dynamic] Error 255
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force
......
shit, 又是你,倒!!!百度...google...google...百度...
about 2005-10-14 零时40分:
好困阿,ZZZZZZZ...
-------------------------------------------------------------------------------------
about 2005-10-4 晚10:30分:
算啦,我再看看INSTALL.html的config部分吧,再不行我就去论坛。看ing,看ing
......
KNOWN PROBLEMS
......
4. )
Red Hat 8 & 9 set the Default locale to UTF which causes problems with MakeMaker. To build DBD::mysql on these systems, do a 'unset LANG' before runing 'perl Makefile.PL'
......
oh, damn it!!! is u UTF. I finally catch u. 马上验证一下
shell> unset LANG
shell> perl Makefile.PL -mysql_config=/home/mysql/bin/mysql_config -testuser=root -testpassword=dbadmin
shell> make
shell> make test
一切正常,yeah!!!
我终于可以
shell> make install
总结
shell> unset LANG (若os的默认字符编码为UTF8,例如FCX)
shell> PATH=/home/mysql/bin:$PATH; export PATH (mysql的安装路径根据实际情况填写)
shell> perl -MCPAN -e shell
cpan> install DBI (根据自己需要)
cpan> force install DBD::mysql (忽略make test结果,强行安装)
测试验证
你可以写个内容如下的perl文件来测试一些你安装的驱动,各参数的具体值由你的实际环境决定
|
转发至微博
转发至微博
评论