1

I tried to install Ruby with version specified 2.5.1 (the version is just example), and tried following script, but I got an error as follows. Is it possible to install Ruby with a version using apt installing so I can deal with Ruby version dependency issue?

$ sudo apt update ; sudo apt install ruby-full=2.5.1
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Get:2 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://ppa.launchpad.net/kelleyk/emacs/ubuntu bionic InRelease                                            
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease       
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                                              
Hit:7 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                            
Hit:8 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease                                               
Hit:9 http://ppa.launchpad.net/teejee2008/timeshift/ubuntu bionic InRelease
Fetched 64.4 kB in 2s (41.9 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
40 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '2.5.1' for 'ruby-full' was not found```
Joakim Danielson
  • 43,251
  • 5
  • 22
  • 52
kaceva5618
  • 86
  • 5
  • Before you ask a question, please make sure to check that the question has not been asked before. This exact same question has already been asked and answered, so there is absolutely no need to repeat it. In fact, a letter-for-letter identical question already exists with an answer that is letter-for-letter identical to the one that you accepted. – Jörg W Mittag Nov 15 '20 at 14:09

1 Answers1

1

You can install rbenv which is a Ruby Environment and then you can install the version of Ruby you want over it.

Refer to this answer

theWellHopeErr
  • 1,856
  • 7
  • 22