尝试安装mysql对rails的支持时出错
Ruby版本:1.8.7(2013-06-27 patchlevel 374)[x86_64-linux] Rails版本:2.3.5 操作系统:云Linux 64位 为了获得rails的支持,我正在尝试安装mysql gem,命令如下:尝试安装mysql对rails的支持时出错,mysql,ruby-on-rails,ruby,gem,Mysql,Ruby On Rails,Ruby,Gem,Ruby版本:1.8.7(2013-06-27 patchlevel 374)[x86_64-linux] Rails版本:2.3.5 操作系统:云Linux 64位 为了获得rails的支持,我正在尝试安装mysql gem,命令如下: gem install mysql -- --with-mysql-config=/usr/lib64/mysql/mysql_config 我得到以下错误 Building native extensions. This could take a whi
gem install mysql -- --with-mysql-config=/usr/lib64/mysql/mysql_config
我得到以下错误
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.8.7-p374/bin/ruby extconf.rb --with-mysql- config=/usr/lib64/mysql/mysql_config
extconf.rb:5: command not found: /usr/lib64/mysql/mysql_config --cflags
*** 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.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/rvm/rubies/ruby-1.8.7-p374/bin/ruby
--with-mysql-config
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.8.7-p374/gems/mysql-2.9.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.8.7-p374/gems/mysql-2.9.1/ext/mysql_api/gem_make.out
我甚至试着寻找mkmf.log,但找不到它。
我正在尝试实现一个RoR项目,该项目已经在CentOS5.964bit中运行。此RoR设计为在上述Ruby&Rails版本中运行,升级将产生问题。请帮助并指导我。似乎您缺少库的开发部分。 您是否安装了libmysqlclient? 配置文件的locate命令的输出是什么
locate mysql_config
不,我还没有安装任何libmysqlclient,如果是,我该如何安装,以及安装的版本是什么?如果我运行'locate mysql_config',我会得到以下响应'locate:can not stat()`/var/lib/mlocate/mlocate.db':没有这样的文件或目录'update over all comment,run
updatedb
,以删除错误。现在我得到了很多mysql\u客户端位置,不知道使用哪一个最终更新-最后我在/usr/bin/mysql\u config
找到了mysql\u客户端位置。现在一切进展顺利,我们将不断更新。