3

我正在寻找安装 ruby​​ 1.9.3。我目前安装了 ruby​​ 1.9.2

Mac Os X Xcode Version 4.3.2 我已经转储了所有以前版本的 Xcode

我已经阅读了大量文章,并尝试了https://stackoverflow.com/a/9651747/1392225中详述的步骤

这是我的错误

ruby-1.9.3-p125 - #fetching 
ruby-1.9.3-p125 - #extracted to /Users/kai/.rvm/src/ruby-1.9.3-p125 (already extracted)
WARN: Patch 'xcode-debugopt-fix-r34840.diff' not found.
ruby-1.9.3-p125 - #configuring 
ruby-1.9.3-p125 - #compiling 
ERROR: Error running 'make ', please read /Users/kai/.rvm/log/ruby-1.9.3-p125/make.log
ERROR: There has been an error while running make. Halting the installation.

错误日志似乎指向这个

compiling readline.c
readline.c: In function ‘username_completion_proc_call’:
readline.c:1499: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:1499: error: (Each undeclared identifier is reported only once
readline.c:1499: error: for each function it appears in.)
make[2]: *** [readline.o] Error 1
make[1]: *** [ext/readline/all] Error 2
make: *** [build-ext] Error 2

有任何想法吗?

4

4 回答 4

7

我得到了同样的错误。我通过使用以下命令解决了它:

rvm reinstall 1.9.3 --with-readline-dir=/usr/local/Cellar/readline/6.2.4

只需使用 homebrew 安装的 readline,在https://rvm.io/packages/readline/上查看更多信息

于 2012-11-20T10:06:53.903 回答
3

看起来您已经在使用 rvm 并且 readline 包有问题,请查看以下说明:

https://rvm.io/packages/readline/

于 2012-05-13T17:59:46.200 回答
1

你安装了readline包吗?

尝试使用最新的 RVM 稳定分支安装 1.9.3-p194(不是 p125),它不需要上述输出提到的 osx 补丁。请仔细按照我在文章中描述的步骤进行操作,如果您仍有问题,请提供您运行的命令(除了输出。)

于 2012-05-14T03:43:55.843 回答
-1

使用http://rvm.io,这可能是当今在您的计算机上安装 Ruby 的最简单和最好的方法。其他人可能会建议使用 rbenv 或 homebrew 或其他数据包管理器。这些可能也很好。

于 2012-05-13T17:57:58.833 回答