"无法构建gem原生扩展"在mac上安装mysql2时出错

时间:2014-04-06 03:52:55

标签: mysql ruby

我在我的mac上的终端中安装mysql2但是有一条错误消息。有谁知道如何解决这个问题?非常感谢!

我的osx版本是10.9并安装了Xcode和命令行工具。

joe@~ $sudo gem install mysql2
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
ERROR: Failed to build gem native extension.

/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/lib
-----
creating Makefile

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


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/gems/mysql2-0.3.15/ext/mysql2/gem_make.out

0 个答案:

没有答案