本文介绍了安装 ruby 1.9.3 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 rvm 安装 Ruby 1.9.3.但是,当我输入:
I'm trying to install Ruby 1.9.3 using rvm. However, when I type:
rvm install 1.9.3
我收到以下错误:
ERROR: Error running 'make ', please read /Users/nick/.rvm/log/ruby-1.9.3-rc1/make.log
ERROR: There has been an error while running make. Halting the installation.
我运行的是 Mac OS X Lion,我当前的 Ruby 版本是 1.9.2.
I'm running Mac OS X Lion and my current version of Ruby is 1.9.2.
make.log:
make[1]: Entering directory `/Users/nick/.rvm/src/ruby-1.9.3/ext/readline'
/usr/bin/gcc-4.2 -I. -I../../.ext/include/x86_64-darwin11.0.0 -I../.././include -I../.././ext/readline -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/nick/.rvm/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -o readline.o -c readline.c
readline.c: In function ‘username_completion_proc_call’:
readline.c:1386: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:1386: error: (Each undeclared identifier is reported only once
readline.c:1386: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make[1]: Leaving directory `/Users/nick/.rvm/src/ruby-1.9.3/ext/readline'
make: *** [mkmain.sh] Error 1
推荐答案
这是 readline
的问题.尝试从源代码自己编译 readline
:
This is an issue with readline
. Try compiling readline
yourself from source:
curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.1.tar.gz
tar xzvf readline-6.1.tar.gz
cd readline-6.1
./configure --prefix=/usr/local
make
sudo make install
这篇关于安装 ruby 1.9.3 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!