无法在干净的 Lion 安装上安装 Ruby 1.9.3 [英] Cannot install Ruby 1.9.3 on a clean Lion Install

查看:104
本文介绍了无法在干净的 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.

有人有可行的程序吗?

相关公开 Ruby 票证的链接

推荐答案

我解决了这个问题.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

这篇关于无法在干净的 Lion 安装上安装 Ruby 1.9.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆