gpt4 book ai didi

mysql - 即使安装了 mysql-devel、ruby-devel 和 ruby​​gems,也无法运行安装 MySQL gem Fedora 14

转载 作者:行者123 更新时间:2023-11-29 07:09:50 25 4
gpt4 key购买 nike

我正在尝试通过

安装 mysql gem
sudo gem install mysql --version 2.7

但是,我收到以下错误:

Building native extensions.  This could take a while...
...........
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

有什么想法吗?

最佳答案

尝试的东西:

gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

当然要使用你的 mysql_config 所在的路径。如果你已经安装了 mysql 客户端,mysql_config 将在那里

gem install mysql -- \
--with-mysql-include=/usr/include/mysql \
--with-mysql-lib=/usr/lib/mysql

使用 mysql 的 lib 和 header 所在的路径。

关于mysql - 即使安装了 mysql-devel、ruby-devel 和 ruby​​gems,也无法运行安装 MySQL gem Fedora 14,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5253939/

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