Cannot install Ruby 1.9.3 on a clean Lion Install

大憨熊 提交于 2019-12-31 04:58:11

问题


Trying to install 1.9.3 using RVM.

Getting these errors in my 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

I faced this issue before in SL. I have Xcode 4.3.2 installed (also installed the command line tools) I have readline 6.2.2 installed.

Added export ARCHFLAGS="-arch x86_64" to my .bash_login file.

I also tried rvm install 1.9.3 --with-gcc=clang but I am getting the same error and I would prefer to avoid doing it due to limited support.

Anyone have a workable procedure?

Edit:

Link to related open Ruby ticket


回答1:


I solved the problem. RVM wasn't recognizing the readline installed. Funny how readline manages to screw up so many people's installs.

This command points rvm toward the right readline location

rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr


来源:https://stackoverflow.com/questions/10343486/cannot-install-ruby-1-9-3-on-a-clean-lion-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!