Sudo Apt Install Ruby Not Working

Sudo Apt Install Ruby Not Working

When running sudo apt install ruby or sudo apt install ruby-full

And checking ruby -v I get the error:

user@C-Ubuntu:~$ ruby -v

Command 'ruby' not found, but can be installed with:

sudo snap install ruby  # version 2.7.0, or
sudo apt  install ruby

See 'snap info ruby' for additional versions.

Even when running sudo apt purge ruby ruby-full or sudo apt remove ruby ruby-full

Help is greatly appriciated :)

1

2 Answers

Which version of Ubuntu are you using? I've tested it in my Ubuntu 18.04 and able to install with below command.

$ sudo apt install ruby

try to do the following and see if it helps.

$ sudo snap install ruby –classic

Check this link below, which has alternate methods of installation in case of "apt & snap" are not working.

Seems that only the snap install works. But still on ubuntu 18.04 apt install does not work. (Tested on 2 different Ubuntu 18 systems)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.