[英]How to use rbenv to install Ruby 2.5.1
I am trying to install Ruby and rbenv but I keep running into errors.我正在尝试安装 Ruby 和 rbenv 但我一直遇到错误。 I tried researching solutions here and attempted several but did not have success.我在这里尝试研究解决方案并尝试了几个但没有成功。
Whenever I attempt to download I get:每当我尝试下载时,我都会得到:
Downloading ruby-2.5.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.1.tar.bz2
Installing ruby-2.5.1...
ruby-build: using readline from homebrew
BUILD FAILED (OS X 10.15.4 using ruby-build 20200401)
Inspect or clean up the working tree at /var/folders/7s/2q_70_3x7qj4q2gx60mp2lw00000gn/T/ruby-build.20200409195302.36573.PF8HnQ
Results logged to /var/folders/7s/2q_70_3x7qj4q2gx60mp2lw00000gn/T/ruby-build.20200409195302.36573.log
Last 10 log lines:
The Ruby yaml extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
--prefix=/Users/shanellevalencia/.rbenv/versions/2.5.1
--with-openssl-dir=/Users/shanellevalencia/.rbenv/versions/2.5.1/openssl
--enable-shared
--with-readline-dir=/usr/local/opt/readline
CC=clang`enter code here
LDFLAGS=-L/Users/shanellevalencia/.rbenv/versions/2.5.1/lib
CPPFLAGS=-I/Users/shanellevalencia/.rbenv/versions/2.5.1/include
Shanelles-MacBook-Pro:~ shanellevalencia$
you should be installing latest stable ruby version 2.7 in your machine instead of old versions.你应该在你的机器上安装最新的稳定 ruby 2.7 版而不是旧版本。
This is a great tutorial for installing ruby using rbenv: https://linuxize.com/post/how-to-install-ruby-on-ubuntu-18-04/#installing-ruby-using-rbenv这是使用 rbenv 安装 ruby 的绝佳教程: https://linuxize.com/post/how-to-install-ruby-on-ubuntu-18-04/#installing-ruby-using-rbenv
I hope it helps.我希望它有帮助。 Let me know if you get stuck anywhere and need any help, I will be glad to support you in any way I can.如果您在任何地方遇到困难并需要任何帮助,请告诉我,我很乐意以任何方式支持您。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.