DEV Community

Michel Sánchez Montells
Michel Sánchez Montells

Posted on • Edited on

1

Dealing with openssl when install old Ruby in recent Ubuntu

Many of you must have faced the problem of installing an old version of Ruby on a new Ubuntu.

Several threads throughout the internet demonstrate this, and various solutions have been shared.

The most common issue is the incompatibility with the OpenSSL version.

Among the most daunting solutions for non-expert Linux users is "compiling OpenSSL, installing it, and configuring Ruby to use this version." At least for me, that option is quite intimidating.

However, RVM provides a native solution.

ex: In ubuntu 22.04
trying to install ruby 2.7.4 like this

rvm install 2.7.4

will raise errors similar to this

/usr/share/rvm/rubies/ruby-2.5.0/lib/libruby.so.2.5(rb_vm_bugreport+0x4ae) [0x7f03e16b18ce]
/usr/share/rvm/rubies/ruby-2.5.0/lib/libruby.so.2.5(0xaafbd) [0x7f03e152ffbd]
/usr/share/rvm/rubies/ruby-2.5.0/lib/libruby.so.2.5(0x19e2e6) [0x7f03e16232e6]
/lib/x86_64-linux-gnu/libc.so.6(0x7f03e128e520) [0x7f03e128e520]
/lib/x86_64-linux-gnu/libssl.so.3(0x7f03df83e140) [0x7f03df83e140]

Enter fullscreen mode Exit fullscreen mode

Solution that works for me

rvm pkg install openssl
rvm install 2.7.4 --with-openssl-dir=/usr/share/rvm/usr
Enter fullscreen mode Exit fullscreen mode

I hope this helps you.

Warp.dev image

The best coding agent. Backed by benchmarks.

Warp outperforms every other coding agent on the market, and gives you full control over which model you use. Get started now for free, or upgrade and unlock 2.5x AI credits on Warp's paid plans.

Download Warp

Top comments (0)

Redis image

Short-term memory for faster
AI agents

AI agents struggle with latency and context switching. Redis fixes it with a fast, in-memory layer for short-term context—plus native support for vectors and semi-structured data to keep real-time workflows on track.

Start building