我一直收到这些错误:
运行'make'时出错,请阅读/Users/jason*/.rvm/log/ruby-1.9.2-p320/make.log 运行make时出错。暂停安装。 ls:/Users/jason*/.rvm/rubies/*/bin/ruby:没有这样的文件或目录
我已经尝试安装readline并确保我拥有最新的GCC版本。 这是错误日志。
/usr/bin/gcc-4.2 -dynamic -bundle -o ../../../.ext/x86_64-darwin11.3.0/racc/cparse.bundle cparse.o -L. -L../../.. -L/Users/jasonvdm/.rvm/usr/lib -L. -L/usr/local/lib -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lpthread -ldl -lobjc
compiling readline
/usr/bin/gcc-4.2 -I. -I../../.ext/include/x86_64-darwin11.3.0 -I../.././include -I../.././ext/readline -DRUBY_EXTCONF_H=\"extconf.h\" -I/Users/jasonvdm/.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: *** [mkmain.sh] Error 1
答案 0 :(得分:4)
您是否从源代码编译Readline?假设您的系统上至少有一个工作版本的Ruby,编译和安装Readline可能不那么痛苦。{/ p>
完成后,您可以再次尝试RVM安装Ruby 1.9.2,它应该跳过Readline编译步骤。
更新以回复评论:
所以你 使用Homebrew安装的Readline。在这种情况下,找出安装新(较少损坏的)Readline库的位置,并尝试将 版本的Readline的位置传递给RVM安装过程。类似的东西:
rvm install ruby-1.9.2-p320 -C --with-的readline-DIR =的/ usr /本地/地窖/ readline的/ 6.2.1
显然,您的目录与我的示例中的目录略有不同。
答案 1 :(得分:0)
如果您正在使用RVM,请阅读this question and answers中的步骤。
您最好使用rvm pkg
命令安装readline库。