gpt4 book ai didi

rvm - 安装 ruby​​ 1.9.3 时出错

转载 作者:行者123 更新时间:2023-12-03 20:35:26 25 4
gpt4 key购买 nike

我正在尝试使用 rvm 安装 Ruby 1.9.3。但是,当我输入:

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。

编辑: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

最佳答案

更简单、更通用的解决方案是明确安装有问题的软件包,然后使用该软件包重新安装。就我而言,它在 openssl_missing 上中止,所以:

rvm pkg install openssl
rvm install 1.9.3 -C "--with-openssl-dir=$HOME/.rvm/usr"

对于您的情况,可能是:
rvm pkg install readline
rvm install 1.9.3 -C "--with-readline-dir=$HOME/.rvm/usr"

这当然假设您自己安装了 rvm。相应地改变...

关于rvm - 安装 ruby​​ 1.9.3 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7962550/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com