Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/61.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
gem mysql2错误_Mysql_Ruby On Rails_Ruby - Fatal编程技术网

gem mysql2错误

gem mysql2错误,mysql,ruby-on-rails,ruby,Mysql,Ruby On Rails,Ruby,我刚把我的mac升级到OSX10.9.8 当我用谷歌搜索这个问题时,我得到了一些解决方案。 (例如:安装Xcode、安装mysql等) 但这仍然不能解决这个问题 尝试安装gem: 错误:安装mysql2时出错: 错误:无法生成gem本机扩展 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb checking for ruby/thread.h... yes checking for

我刚把我的mac升级到OSX10.9.8

当我用谷歌搜索这个问题时,我得到了一些解决方案。 (例如:安装Xcode、安装mysql等)

但这仍然不能解决这个问题

尝试安装gem: 错误:安装mysql2时出错: 错误:无法生成gem本机扩展

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting rpath to /usr/local/Cellar/mysql/5.6.17_1/lib
-----
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling client.c
compiling infile.c
compiling mysql2_ext.c
compiling result.c
linking shared-object mysql2/mysql2.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [mysql2.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/mysql2-0.3.15 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/mysql2-0.3.15/gem_make.out
解决方案是
sudo ARCHFLAGS=-Wno error=unused命令行参数硬错误(在将来的gem安装mysql2时)


如果有人遇到同样的问题,您可以尝试
ARCHFLAGS=-Wno error=unused command line argument hard error in future gem install gem_name

?也许这会有帮助:检查这个问题:这就是工作!!谢谢