RVM: Solution to "__rvm_make -j8/j12" error

January 9, 2024

Introduction

Both on Arch and Debian-based distributions I've encountered j8/j12 error while trying to install any version of Ruby via Ruby Version Manager (RVM). Even though solutions were accessible for Mac OS, I couldn't find any solutions for my system. Unexpectedly, it appears that resolving this error is just a matter of a few command lines.

Fix

In order to fix j8/j12 error, we will have to install Ruby with OpenSSL support.

OpenSSL Installation

$ sudo apt-get install libssl-dev

Locate the OpenSSL Installation Directory

  • Ubuntu/Debian:
$ openssl version -d

Ruby Installation with OpenSSL flag

Now, let's utilize the OPENSSLDIR obtained from the previous step. For this example, let's install version 2.6.5. We'll use the --with-openssl-dir=/path/to/openssl flag to specify the path to the installed OpenSSL package.

$ rvm install 2.6.5 --with-openssl-dir=/usr/lib/ssl

And that's it! Ruby 2.6.5 is installed ❤

Built with love using Next.js and Tailwind