I'm getting this error - Error running '__rvm_make -j8' when trying to install an older version of ruby. Tried reinstalling rvm which didn't help. I have ruby v3 which works fine but need an older version.
Here's the final bits of the make log
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
linking shared-object readline.so
compiling ossl_asn1.c
ossl.c: In function ‘ossl_clear_error’:
ossl.c:311:9: error: ‘ERR_get_error_line_data’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
311 | while ((e = ERR_get_error_line_data(&file, &line, &data, &flags))) {
| ^~~~~
In file included from ossl.h:21,
from ossl.c:10:
/usr/include/openssl/err.h:413:15: note: declared here
413 | unsigned long ERR_get_error_line_data(const char **file, int *line,
| ^~~~~~~~~~~~~~~~~~~~~~~
make[2]: Leaving directory '/home/ether-_-/.rvm/src/ruby-2.6.2/ext/readline'
compiling ossl_bio.c
make[2]: Entering directory '/home/ether-_-/.rvm/src/ruby-2.6.2/ext/strscan'
compiling strscan.c
ossl.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
cc1: some warnings being treated as errors
make[2]: *** [Makefile:312: ossl.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Entering directory '/home/ether-_-/.rvm/src/ruby-2.6.2/ext/coverage'
compiling coverage.c
linking shared-object nkf.so
.
.
.
.
.
make[2]: Entering directory '/home/ether-_-/.rvm/src/ruby-2.6.2/ext/-test-/bignum'
compiling init.c
make[2]: Leaving directory '/home/ether-_-/.rvm/src/ruby-2.6.2/ext/-test-/arith_seq/extract'
linking shared-object zlib.so
make[2]: Entering directory '/home/ether-_-/.rvm/src/ruby-2.6.2/ext/-test-/bug-3571'
compiling bug.c
make[2]: Leaving directory '/home/ether-_-/.rvm/src/ruby-2.6.2/ext/openssl'
make[1]: *** [exts.mk:241: ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
.
.
.
make[2]: Leaving directory '/home/ether-_-/.rvm/src/ruby-2.6.2/ext/bigdecimal'
make[1]: Leaving directory '/home/ether-_-/.rvm/src/ruby-2.6.2'
make: *** [uncommon.mk:286: build-ext] Error 2
++ return 2