我正在新的 macbook pro 上使用 rvm 安装 ruby 1.8.7。我的版本是 10.6.8,xcode 是 4.0.2。 RVM 已启动。我可以毫无问题地安装 1.9.2。但是当我尝试 1.8.7 时,出现错误:
ERROR: Error running 'make ', please read /Users/brentw/.rvm/log/ruby-1.8.7-p352/make.log
ERROR: There has been an error while running make. Halting the installation.
在 make.log 文件中,最后几行内容为:
ld: warning: ignoring file ../../../libruby.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
compiling win32ole
compiling zlib
making ruby
/usr/bin/gcc-4.2 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp -fno-common -pipe -fno-common -DRUBY_EXPORT -L. -arch i386 -arch x86_64 -bind_at_load main.o -lruby -lpthread -ldl -lobjc -o ruby
ld: warning: ignoring file ./libruby.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
"_ruby_init_stack", referenced from:
_main in main.o
"_ruby_init", referenced from:
_main in main.o
"_ruby_options", referenced from:
_main in main.o
"_ruby_run", referenced from:
_main in main.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/ay/aypnf68iFrumAawnjs+96FjhQuk/-Tmp-//cc7BuLDX.out (No such file or directory)
make[1]: *** [ruby] Error 1
make: *** [all] Error 2
我一直在到处搜索,尝试了多种方法,但我似乎无法升级 1.8.7。我尝试了不同的补丁(虽然可能不是全部),尝试安装 ree,安装 rvm readline,尝试“rvm install 1.8.7 -C --with-arch=x86_64, --with-readline-dir=$rvm_path/usr” ...没有运气...
最佳答案
就我而言,我最终降级到 rvm 1.8.0,并使用 --with-readline-dir 标志来安装 ruby 1.8.7。终于成功了!!感谢您提供线索。
关于ruby-on-rails - rvm install 1.8.7(雪豹)make.log错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7352479/