Trouble installing Ruby in the terminal


#1

Entered: rbenv install 2.6.5 --verbose

Here is last bit returned:
c/ruby
The Ruby openssl extension was not compiled.
The Ruby readline extension was not compiled.
The Ruby zlib extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Try running apt-get install -y libssl-dev libreadline-dev zlib1g-dev to fetch missing dependencies.

Configure options used:
–prefix=/home/cameron/.rbenv/versions/2.6.5
–enable-shared
LDFLAGS=-L/home/cameron/.rbenv/versions/2.6.5/lib
CPPFLAGS=-I/home/cameron/.rbenv/versions/2.6.5/include

BUILD FAILED (Ubuntu 18.04 using ruby-build 20200115-8-g73b926b)

Inspect or clean up the working tree at /tmp/ruby-build.20200130153137.8291.NqHxOU
Results logged to /tmp/ruby-build.20200130153137.8291.log

Last 10 log lines:
The Ruby readline extension was not compiled.
The Ruby zlib extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Try running apt-get install -y libssl-dev libreadline-dev zlib1g-dev to fetch missing dependencies.

Might someone be able to help me successfully install ruby?


#2

sudo apt install curl git nodejs gcc make libssl-dev libreadline-dev zlib1g-dev libsqlite3-dev

Did you run this command?