【发布时间】:2012-03-17 12:40:30
【问题描述】:
我最近在 Mac OS X 上安装了 ruby 1.9.3-p125。我将 rvm 用于 ruby mgmt,将 homebrew 用于 mysql 等。
奇怪的是,我在 p125 上遇到了一个奇怪的问题,在 p0 上似乎根本没有发生,并希望对这里可能发生的事情有所了解:
$ gem install mysql2
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/Users/username/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
creating Makefile
make
compiling result.c
cc1: error: unrecognized command line option "-aes"
make: *** [result.o] Error 1
Gem files will remain installed in /Users/username/.rvm/gems/ruby-1.9.3-p125@all/gems/mysql2-0.3.11 for inspection.
Results logged to /Users/username/.rvm/gems/ruby-1.9.3-p125@all/gems/mysql2-0.3.11/ext/mysql2/gem_make.out
奇怪的是,如果我卸载 mysql 并重新安装它,然后构建 gem,它似乎可以工作......但只有在每次都非常努力之后。
澄清一下,Xcode 4.3 已安装并且构建环境看起来完全正常。如果我从 mysql2 Makefile 中删除-aes,它将构建和安装得很好,所以由于某种原因,这似乎是 ruby 1.9.3-p125、mysql2 以及新的 Xcode 4.3 的组合效果...
【问题讨论】:
-
我刚刚从
mysql2开发人员那里收到了有趣的评论:“我实际上刚刚有一个同事遇到了同样的错误。甚至不知道 -aes 选项来自哪里。绝对让我知道你是否追踪到了什么。” link to issue -
现已解决。问题原讨论:github.com/mxcl/homebrew/issues/10549#issuecomment-4208528 ----------------------------------------- -------------------------------------------
标签: mysql ruby-on-rails ruby gem homebrew