gpt4 book ai didi

mysql - 尝试安装 Perl-Mysql DBD,找不到 mysql_config

转载 作者:IT老高 更新时间:2023-10-28 23:45:33 29 4
gpt4 key购买 nike

这是输出:

Ian-MacBook-Pro:DBD-mysql-4.011 ianseyer$ sudo Perl Makefile.PLCan'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 locatedCan'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 locatedCan'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 locatedPLEASE 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=usernameCan'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 locatedCan'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 locatedCan'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 locatedFailed to determine directory of mysql.h. Use  perl Makefile.PL --cflags=-Ito set this directory. For details see the INSTALL.html file,section "C Compiler flags" or type  perl Makefile.PL --help

我已经研究了这个问题并尝试创建一个符号链接(symbolic link)无济于事。

我必须自己编译吗?

最佳答案

如果你安装了大家都安装的mysql服务器:sudo apt-get install mysql-server (或类似的东西)

你缺少一些额外的文件,这个 perl 模块的 makefile 依赖于这些文件。

您可以尝试通过安装以下软件包来解决此问题:

sudo apt-get install libmysqlclient-dev 

引用: http://cpansearch.perl.org/src/RUDY/DBD-mysql-2.9008/INSTALL.html#configuration

关于mysql - 尝试安装 Perl-Mysql DBD,找不到 mysql_config,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4729722/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com