本文介绍了在雪豹上使用`rvm`安装`ruby-1.8.7-p334`时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装Snow Leopard(OS X 10.6)后,我的一些Ruby宝石停止工作.我还安装了Xcode(获取make)并在将ruby-1.8.7-p334rvm一起安装时出现以下错误.运行Leopard时,我能够成功安装它.任何帮助将不胜感激.

Some of my Ruby gems stopped working after installing Snow Leopard (OS X 10.6). I also installed Xcode (to get make) and get the following error when installing ruby-1.8.7-p334 with rvm. I was able to succesfully install it when running Leopard. Any help would be appreciated.

Macintosh:haloror patelc75$ rvm install ruby-1.8.7-p334

Installing Ruby from source to: /Users/patelc75/.rvm/rubies/ruby-1.8.7-p334, this may take a while depending on your cpu(s)...
ruby-1.8.7-p334 - #fetching
ruby-1.8.7-p334 - #extracted to /Users/patelc75/.rvm/src/ruby-1.8.7-p334 (already extracted)
ruby-1.8.7-p334 - #configuring
ruby-1.8.7-p334 - #compiling
ERROR: Error running 'make ', please read /Users/patelc75/.rvm/log/ruby-1.8.7-p334/make.log
ERROR: There has been an error while running make. Halting the installation.

Macintosh:haloror patelc75$ more /Users/patelc75/.rvm/log/ruby-1.8.7-p334/make.log

[2011-08-23 17:21:55] make
gcc -g -O2  -fno-common -pipe -fno-common    -DRUBY_EXPORT  -L.    main.o dmydln.o libruby-static.a -ldl -lobjc   -o miniruby
Undefined symbols:
"_Init_ext", referenced from:
  _require_libraries in libruby-static.a(ruby.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [miniruby] Error 1

推荐答案

请检查/Users/patelc75/.rvm/log/ruby-1.8.7-p334/make.log中的日志文件在大多数情况下,readline可能是个问题.要解决这个问题

Please check the log file at /Users/patelc75/.rvm/log/ruby-1.8.7-p334/make.logreadline may be the issue most of the time. to fix that please do

rvm pkg install readline

在您可能想要做之前

rvm remove 1.8.7
rvm cleanup

rvm remove 1.8.7
rvm cleanup

这篇关于在雪豹上使用`rvm`安装`ruby-1.8.7-p334`时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 16:07