无法在干净的Lion安装上安装Ruby 1.9.3

时间:2012-04-27 01:08:03

标签: ruby rvm ruby-1.9.3

尝试使用RVM安装1.9.3。

make.log

中收到这些错误
compiling readline.c
readline.c:1499:9: error: use of undeclared identifier 'username_completion_function'; did you mean 'rl_username_completion_function'?
                                    rl_username_completion_function);
                                    ^
readline.c:69:42: note: expanded from macro 'rl_username_completion_function'
# define rl_username_completion_function username_completion_function
                                         ^
/usr/local/include/readline/readline.h:443:14: note: 'rl_username_completion_function' declared here
extern char *rl_username_completion_function PARAMS((const char *, int));
             ^
1 error generated.
make[2]: *** [readline.o] Error 1
make[1]: *** [ext/readline/all] Error 2
make: *** [build-ext] Error 2

我在SL之前遇到过这个问题。我安装了Xcode 4.3.2(还安装了命令行工具)我已经安装了readline 6.2.2。

在我的export ARCHFLAGS="-arch x86_64"文件中添加了.bash_login

我也试过了rvm install 1.9.3 --with-gcc=clang但是我遇到了同样的错误,我宁愿避免这样做,因为支持有限。

任何人都有可行的程序吗?

编辑:

Link to related open Ruby ticket

1 个答案:

答案 0 :(得分:1)

我解决了这个问题。 RVM没有识别安装的readline。有趣的是,readline设法搞砸了这么多人的安装。

此命令将rvm指向右侧读取线位置

rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr
相关问题