昨天下午无聊把我的 MBA 重装了系统(花了 3 个小时),全新的 OS X 10.7.3,然后是安装了 Xcode 4.3.1,在 app store 下的,4.3.1 下载之后不需要 install 就可以用了,然后下载安装了 Command Line Tools,详细的环境如下:
系统版本:Mac OS X 10.7.3 (11D50) 内核版本:Darwin 11.3.0 64 位内核和功能扩展:是 Developer Information: Version: No version information available Location: /Applications/Xcode.app Applications: Xcode: 4.3.1 (1176) Instruments: 4.3 (4321)
安装 rails 是按照网站 wiki 的介绍安装的,一步一步的来的,这次很老实,一路上也没有用 sudo,RVM 的安装没有任何问题:
rvm -v
rvm 1.10.3 by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.beginrescueend.com/]
$ rvm pkg install readline
也没问题,看到安装了 readline-5.2 和 readline-6.2,安装过程没有任何报错,然后到下一步安装 ruby1.9.3 的时候出错,出现如下错误:
ruby-1.9.3-p125 - #fetching
ruby-1.9.3-p125 - #extracting ruby-1.9.3-p125 to /Users/standme/.rvm/src/ruby-1.9.3-p125
ruby-1.9.3-p125 - #extracted to /Users/standme/.rvm/src/ruby-1.9.3-p125
Applying patch 'xcode-debugopt-fix-r34840' (located at /Users/standme/.rvm/patches/ruby/1.9.3/p125/xcode-debugopt-fix-r34840.diff)
ruby-1.9.3-p125 - #autoreconf
Error running 'autoreconf', please read /Users/standme/.rvm/log/ruby-1.9.3-p125/autoreconf.log
ruby-1.9.3-p125 - #configuring
Error running ' ./configure --prefix=/Users/standme/.rvm/rubies/ruby-1.9.3-p125 --enable-shared --disable-install-doc --with-readline --with-opt-dir=/Users/standme/.rvm/usr --with-libyaml --with-gcc=clang ', please read /Users/standme/.rvm/log/ruby-1.9.3-p125/configure.log
There has been an error while running configure. Halting the installation.
奇怪的是,我自行编译 autoconf 然后重新尝试安装仍然出现这个错误,用 homebrew 安装 autoconf 然后重新尝试安装还是出现这个错误,不知道为何。
查看了/Users/standme/.rvm/log/ruby-1.9.3-p125/configure.log 这个 LOG 文件,发现主要的错误信息如下:首先是这里报错:
./configure --prefix=/Users/standme/.rvm/rubies/ruby-1.9.3-p125 --enable-shared --disable-install-doc --with-readline --with-opt-dir=/Users/standme/.rvm/usr --with-libyaml --with-gcc=clang
configure: WARNING: unrecognized options: --with-readline, --with-libyaml
最后的错误归结到这里:
.ext/include/x86_64-darwin11.3.0/ruby/config.h updated
ruby library version = 1.9.1
configure: creating ./config.status
config.status: creating Makefile
configure: WARNING: unrecognized options: --with-readline, --with-libyaml
configure: WARNING: unrecognized options: --with-readline, --with-libyaml
config.status: creating ruby-1.9.pc
./config.status: line 1113: s_fn_exit: command not found
这些代码上面都是 checking 奇怪了,最近怎么老是出现这些很纠结的错误啊