安装DBD::mysql模块时碰到的问题。

数据库服务和管理,MySQL/PostgreSQL/Oracle/Sybase 等
回复
scau_2005
帖子: 2
注册时间: 2007-06-08 0:25
送出感谢: 0
接收感谢: 0

安装DBD::mysql模块时碰到的问题。

#1

帖子 scau_2005 » 2007-08-31 23:11

第一次在这里发帖。碰到了一个问题如下:


安装DBD::mysql模块时
Perl: 5.8.6
shell> perl -MCPAN -e shell
cpan> install DBI
................
cpan> install DBD::mysql
提示错误信息,like this:
......
CPAN.pm: Going to build C/CA/CAPTTOFU/DBD-mysql-4.005.tar.gz

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

perl Makefile.PL --cflags=-I<dir>
to set this directory. For details see the INSTALL.html file,
section "C Compiler flags" or type

perl Makefile.PL --help

猜测估计是根据PATH找不到mysql_config的原因,我百度了别人解决这个问题的办法,如下:
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

可是我是用新利德装的mysql,好像跟被就不存在/mysq/bin/mysql_config这样的文件夹和文件。这是怎么回事阿?
我是一个菜鸟。请大家帮帮我啊。着急啊!l
calm_season
帖子: 10
注册时间: 2009-06-21 21:58
送出感谢: 0
接收感谢: 0

Re: 安装DBD::mysql模块时碰到的问题。

#2

帖子 calm_season » 2009-08-27 21:15

你好,我遇到了和你一样的问题,怎么解决?没看懂阿

还望赐教!
fatdong
帖子: 1
注册时间: 2010-02-25 17:10
送出感谢: 0
接收感谢: 0

Re: 安装DBD::mysql模块时碰到的问题。

#3

帖子 fatdong » 2010-02-25 17:14

我看了DBD::mysql的README,原来ubuntu是不需要安装DBD::mysql :em04
ubuntu是基于debian,直接安装libdbi-perl lidbd-mysql-perl 就OK了。我自己也折腾了好一会儿,看来装啥都要README啊。 :em02
回复

回到 “数据库管理”