【发布时间】:2014-04-11 18:07:03
【问题描述】:
Ruby 版本:1.8.7 (2013-06-27 补丁级别 374) [x86_64-linux] 导轨版本:2.3.5 操作系统:Cloud Linux 64 位
我正在尝试安装mysql gem以获得支持rails,命令如下,
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,但找不到。 我正在尝试实现一个已经在 Cent OS 5.9 64bit 中运行的 RoR 项目。此 RoR 设计为在上述版本的 Ruby & Rails 中运行,升级会产生问题。请帮助并指导我。
【问题讨论】:
标签: mysql ruby-on-rails ruby gem