尝试安装Perl-Mysql DBD,找不到mysql_config [英] Trying to install Perl-Mysql DBD, mysql_config can't be found
问题描述
以下是输出:
Ian-MacBook-Pro:DBD-mysql-4.011 ianseyer $ sudo Perl Makefile.PL
execmysql_config:没有这样的文件或目录在Makefile.PL行76.
找不到文件'mysql_config'!您的执行PATH似乎
不包含mysql_config的路径。追求猜测的价值观!
无法执行mysql_config:在Makefile.PL第454行没有这样的文件或目录。
找不到mysql_config。使用--mysql_config选项指定mysql_config所在的位置
无法执行mysql_config:在Makefile.PL行454中没有这样的文件或目录。
找不到mysql_config。使用--mysql_config选项指定mysql_config所在的位置
无法执行mysql_config:在Makefile.PL行454中没有这样的文件或目录。
找不到mysql_config。使用--mysql_config选项指定mysql_config所在的位置
请注意:
要使make test正常运行,必须确保
数据库用户'root'可以连接到你的MySQL服务器
,并且具有这些测试需要这样的
的适当的特权:'drop table','create table','drop procedure' '
以及其他。
mysql>将所有权限测试。*授予'root'@'localhost',由's3kr1t'标识;
您还可以选择设置用户运行'make test':
perl Makefile.pl --testuser = username
可以' t execmysql_config:在Makefile.PL第454行没有这样的文件或目录。
找不到mysql_config。使用--mysql_config选项指定mysql_config所在的位置
无法执行mysql_config:在Makefile.PL行454中没有这样的文件或目录。
找不到mysql_config。使用--mysql_config选项指定mysql_config所在的位置
无法执行mysql_config:在Makefile.PL行454中没有这样的文件或目录。
找不到mysql_config。使用--mysql_config选项指定mysql_config所在的位置
无法确定mysql.h的目录。使用
perl Makefile.PL --cflags = -I
设置此目录。有关详细信息,请参阅INSTALL.html文件
C编译器标志或键入
perl Makefile.PL --help
我已经研究了这个问题,并试图建立一个符号链接无效。
我必须自己编译吗?
如果你安装了每个人都安装的mysql服务器:
sudo apt-get install mysql-server / p>
您缺少这个perl模块的makefile所依赖的几个额外文件。
通过安装以下软件包解决此问题:
sudo apt-get install libmysqlclient-dev
REFERECE:
http://cpansearch.perl.org/src/RUDY/DBD-mysql-2.9008/ INSTALL.html#configuration
Here's the output:
Ian-MacBook-Pro:DBD-mysql-4.011 ianseyer$ sudo Perl Makefile.PL 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 find mysql_config. Use --mysql_config option to specify where mysql_config is located Can't exec "mysql_config": No such file or directory at Makefile.PL line 454. Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located Can't exec "mysql_config": No such file or directory at Makefile.PL line 454. Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located PLEASE NOTE: For 'make test' to run properly, you must ensure that the database user 'root' can connect to your MySQL server and has the proper privileges that these tests require such as 'drop table', 'create table', 'drop procedure', 'create procedure' as well as others. mysql> grant all privileges on test.* to 'root'@'localhost' identified by 's3kr1t'; You can also optionally set the user to run 'make test' with: perl Makefile.pl --testuser=username Can't exec "mysql_config": No such file or directory at Makefile.PL line 454. Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located Can't exec "mysql_config": No such file or directory at Makefile.PL line 454. Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located Can't exec "mysql_config": No such file or directory at Makefile.PL line 454. Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located Failed to determine directory of mysql.h. Use perl Makefile.PL --cflags=-I to set this directory. For details see the INSTALL.html file, section "C Compiler flags" or type perl Makefile.PL --help
I've researched the issue and tried making a symlink to no avail.
Do I have to compile this myself?
If you installed the mysql server that everybody installs: sudo apt-get install mysql-server (or something like this)
you are missing a few extra files on which the makefile for this perl module depends.
You can try to work around this issue by installing the following package: sudo apt-get install libmysqlclient-dev
REFERECE: http://cpansearch.perl.org/src/RUDY/DBD-mysql-2.9008/INSTALL.html#configuration
这篇关于尝试安装Perl-Mysql DBD,找不到mysql_config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!