Got this error message:
[sudo] password for saeedeh:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ruby
What should I do?
As @N0rbert said, It probably depends on version of Ubuntu you're working on.
You could test sudo apt-get update
and then run sudo apt-get install ruby-full
again.
If above mentioned method fails, you must try other methods. Ruby official site states:
There are several ways to install Ruby:
When you are on a UNIX-like operating system, using your system’s package manager is the easiest way of getting started. However, the packaged Ruby version usually is not the newest one.
Installers can be used to install a specific or multiple Ruby versions. There is also an installer for Windows.
Managers help you to switch between multiple Ruby installations on your system.
And finally, you can also build Ruby from source.
ruby
) means that your apt data base is either empty or corrupt. Runsudo apt update
to populate the apt database, then try installing ruby again. – user535733 Jan 24 '18 at 17:54