gpt4 book ai didi

ruby-on-rails - 使用 rbenv 安装新的 ruby​​ 版本时出现 readline 错误

转载 作者:太空宇宙 更新时间:2023-11-04 05:21:58 25 4
gpt4 key购买 nike

尝试使用rbenv install 2.3.1安装ruby-2.3.1。以下是上述失败命令的错误跟踪。

BUILD FAILED (Amazon Linux AMI 2016.09 using ruby-build 20160602)

Inspect or clean up the working tree at /tmp/ruby-build.20161024151611.24040
Results logged to /tmp/ruby-build.20161024151611.24040.log

Last 10 log lines:
# define rl_username_completion_function username_completion_function
^
readline.c:1780:37: note: in expansion of macro 'rl_username_completion_function'
rl_username_completion_function);
^
make[2]: *** [readline.o] Error 1
make[2]: Leaving directory /tmp/ruby-build.20161024151611.24040/ruby-2.3.1/ext/readline'
make[1]: *** [ext/readline/all] Error 2
make[1]: Leaving directory/tmp/ruby-build.20161024151611.24040/ruby-2.3.1'

sudo yum install readline-devel

Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main/latest | 2.1 kB 00:00
amzn-updates/latest | 2.3 kB 00:00
Package readline-devel-6.2-9.14.amzn1.x86_64 already installed and latest version
Nothing to do

最佳答案

Tested in (Amazon Linux AMI 2016.09 using ruby-build 20160913-13-g8ef0c34)

Run the following commands in terminal

$ sudo yum install -y git gcc openssl-devel readline-devel zlib-devel
$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ ~/.rbenv/bin/rbenv init
$ source ~/.bash_profile
$ eval "$(rbenv init -)"
$ type rbenv
$ git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
$ rbenv install 2.3.1
$ rbenv install 2.3.1perl: warning: Setting locale failed.perl: warning: Please check that your locale settings:    LANGUAGE = (unset),    LC_ALL = (unset),    LC_CTYPE = "UTF-8",    LANG = "en_US.UTF-8"    are supported and installed on your system.perl: warning: Falling back to the standard locale ("C").Downloading ruby-2.3.1.tar.bz2...-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.bz2Installing ruby-2.3.1...Installed ruby-2.3.1 to /home/ec2-user/.rbenv/versions/2.3.1

关于ruby-on-rails - 使用 rbenv 安装新的 ruby​​ 版本时出现 readline 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40222375/

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