简体   繁体   中英

Why can't rbenv install the latest Ruby version on Ubuntu?

I want to install a recent version of Ruby on Ubuntu 20.04. But when I run rbenv install -l on my Ubuntu server, I only see old versions of Ruby listed.

Available versions:
  1.8.5-p52
  ...
  2.2.7
  2.3.0-dev
  2.3.0-preview1
  2.3.0-preview2
  2.3.0
  2.3.1
  2.3.2
  2.3.3
  2.3.4
  2.4.0-dev
  2.4.0-preview1
  2.4.0-preview2
  2.4.0-preview3
  2.4.0-rc1
  2.4.0
  2.4.1
  2.5.0-dev
  jruby-1.5.6
  jruby-1.6.3
  jruby-1.6.4
  ...
  jruby-9.1.8.0
  jruby-9.1.9.0-dev
  jruby-9.1.9.0
  jruby-9.1.10.0
  jruby-9.1.11.0
  jruby-9.1.12.0
  maglev-1.0.0
  maglev-1.1.0-dev
  maglev-2.0.0-dev
  mruby-dev
  mruby-1.0.0
  mruby-1.1.0
  mruby-1.2.0
  rbx-2.2.2
  rbx-2.2.3
  ...
  rbx-3.79
  rbx-3.80
  rbx-3.81
  rbx-3.82
  ree-1.8.7-2011.03
  ree-1.8.7-2011.12
  ree-1.8.7-2012.01
  ree-1.8.7-2012.02
  topaz-dev

Compared to when I run it locally on my mac, I see recent versions like 2.7.1 .

2.5.8
2.6.6
2.7.1
...

Why don't these new version show on Ubuntu? I have rbenv 1.1.1 installed on Ubuntu.

This is probably a dumb question but I have little understanding of code below the webdev level.

I ran this command and it solved my problem.

git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

Now I see recent versions of Ruby.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM