无法在干净的 Lion 安装上安装 Ruby 1.9.3
尝试使用 RVM 安装 1.9.3.
Trying to install 1.9.3 using RVM.
在我的 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.
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.
在我的 .bash_login
文件中添加了 export ARCHFLAGS="-arch x86_64"
.
Added export ARCHFLAGS="-arch x86_64"
to my .bash_login
file.
我也尝试过 rvm install 1.9.3 --with-gcc=clang
但我遇到了同样的错误,由于支持有限,我宁愿避免这样做.
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.
有人有可行的程序吗?
我解决了这个问题.RVM 无法识别已安装的 readline.有趣的是,readline 设法搞砸了这么多人的安装.
I solved the problem. RVM wasn't recognizing the readline installed. Funny how readline manages to screw up so many people's installs.
此命令将 rvm 指向正确的 readline 位置
This command points rvm toward the right readline location
rvm install 1.9.3 --with-gcc=clang --with-readline-dir=$rvm_path/usr