关于这个问题的大多数问题是由于缺少Xcode; 我安装了Xcode 4.2.
安装尝试:
rvm install 1.9.3
Installing Ruby from source to: /Users/jamie/.rvm/rubies/ruby-1.9.3-p0, this may take a while depending on your cpu(s)...
ruby-1.9.3-p0 - #fetching
ruby-1.9.3-p0 - #extracted to /Users/jamie/.rvm/src/ruby-1.9.3-p0 (already extracted)
Fetching yaml-0.1.4.tar.gz to /Users/jamie/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/jamie/.rvm/src
Configuring yaml in /Users/jamie/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/jamie/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/jamie/.rvm/usr
ruby-1.9.3-p0 - #configuring
ERROR: Error running ' ./configure --prefix=/Users/jamie/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/jamie/.rvm/usr ', please read /Users/jamie/.rvm/log/ruby-1.9.3-p0/configure.log
ERROR: There has been an error while running configure. Halting the installation. …Run Code Online (Sandbox Code Playgroud) 在切换到Lion(并从头开始重建我的系统)后,我决定尝试rbenv在此过程中.不幸的是,自从交换机以来我一直无法编译Ruby 1.9.3并且现在仍然使用我在Snow Leopard上编译的Ruby.我希望有人可以发现任何继续躲避我的事情.以下是我一直在运作的假设:
到目前为止我尝试过的:
手动构建
./configure && make && make install
Run Code Online (Sandbox Code Playgroud)让ruby-build做#1.为了我.
rbenv install -v 1.9.3-p286
Run Code Online (Sandbox Code Playgroud)使用非LLVM编译器进行编译(通过安装apple-gcc42Homebrew包)
CC=/usr/local/bin/gcc-4.2 rbenv install -v 1.9.3-p286
Run Code Online (Sandbox Code Playgroud)尝试shared选项,因为它适用于Snow Leopard
CONFIGURE_OPTS="--with-shared" rbenv install -v 1.9.3-p286
Run Code Online (Sandbox Code Playgroud)并且每次构建都以相同,模糊的方式失败:通过不存在的测试和失败的Array相关测试:
configuring win32ole
Failed to configure win32ole. It will not be installed.
configuring zlib
/bin/sh: line 0: cd: ext/-test-/array/resize: No such file or directory
/bin/sh: line 0: cd: ext/-test-/add_suffix: No such file …Run Code Online (Sandbox Code Playgroud)