Tuesday, December 12, 2006

DBD::mysql安装问题

在安装perl的DBD::mysql模块的时候遇到一些问题

$ perl -MCPAN -e shell
[....]
Can't exec "mysql_config": No such file or directory at Makefile.PL line 76.

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.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Failed to determine directory of mysql.h. Use
[....]

进入DBD::mysql的代码安装目录

$ cd $HOME/.cpan/build/DBD-mysql-3.0008
$ perl --mysql_config=$MYSQL_PREFIX_DIR/bin/mysql_config
$ make
$ make test
$ make install

这样就安装成功了

No comments:

Post a Comment