Cannot install Ruby with rbenv 2.3.1 in Ubuntu 16.04 -
while installing ruby rbenv ubuntu 16.04 error regarding ruby build shown. i've tried removing rbenv , again re-installing rbenv, following error.
i've followed digitalocean's procedure installing rbenv in here, , followed steps listed here ruby_build. i've installed dependencies required build.
still after times of uninstall , install of rbenv problem same.
~$ rbenv install 2.3.1 downloading ruby-2.3.1.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.bz2 installing ruby-2.3.1... build failed (ubuntu 16.04 using ruby-build 20170726-2-g254728e) inspect or clean working tree @ /tmp/build.20170818162042.1074 results logged /tmp/ruby-build.20170818162042.1074.log last 10 log lines: linking shared-object objspace.so make[2]: leaving directory '/tmp/ruby-build.20170818162042.1074/ruby-2.3.1/ext/objspace' installing default date_core libraries linking shared-object date_core.so make[2]: leaving directory '/tmp/ruby-build.20170818162042.1074/ruby-2.3.1/ext/date' linking shared-object nkf.so make[2]: leaving directory '/tmp/ruby-build.20170818162042.1074/ruby-2.3.1/ext/nkf' make[1]: leaving directory '/tmp/ruby-build.20170818162042.1074/ruby-2.3.1' uncommon.mk:203: recipe target 'build-ext' failed make: *** [build-ext] error 2
result of cat /tmp/ruby-build.20170818162042.1074.log
in file included ossl.h:57:0, ossl_bn.c:11: /usr/include/openssl/asn1_mac.h:10:2: error: #error "this file obsolete; please update software." #error "this file obsolete; please update software." ^ in file included ossl.h:221:0, ossl_bn.c:11: openssl_missing.h:78:35: error: macro "evp_md_ctx_create" passed 1 arguments, takes 0 evp_md_ctx *evp_md_ctx_create(void); ^ in file included /usr/include/openssl/x509.h:23:0, /usr/include/openssl/x509v3.h:14, ossl.h:58, ossl_bn.c:11: openssl_missing.h:82:6: error: expected declaration specifiers or ‘...’ before ‘(’ token void evp_md_ctx_init(evp_md_ctx *ctx); ^ openssl_missing.h:90:6: error: expected declaration specifiers or ‘...’ before ‘(’ token void evp_md_ctx_destroy(evp_md_ctx *ctx); ^ ossl_bn.c: in function ‘ossl_bn_size’: ossl_bn.c:43:19: error: invalid application of ‘sizeof’ incomplete type ‘bignum {aka struct bignum_st}’ return sizeof(bignum); ^ ossl_bn.c: in function ‘ossl_bn_s_generate_prime’: ossl_bn.c:769:5: warning: ‘bn_generate_prime’ deprecated [-wdeprecated-declarations] if (!bn_generate_prime(result, num, safe, add, rem, null, null)) { ^ in file included /usr/include/openssl/bn.h:31:0, /usr/include/openssl/asn1.h:24, /usr/include/openssl/objects.h:916, /usr/include/openssl/evp.h:27, /usr/include/openssl/x509.h:23, /usr/include/openssl/x509v3.h:14, ossl.h:58, ossl_bn.c:11: /usr/include/openssl/bn.h:285:1: note: declared here deprecatedin_0_9_8(bignum *bn_generate_prime(bignum *ret, int bits, int safe, ^ ossl_bn.c: in function ‘ossl_bn_is_prime’: ossl_bn.c:877:5: warning: ‘bn_is_prime’ deprecated [-wdeprecated-declarations] switch (bn_is_prime(bn, checks, null, ossl_bn_ctx, null)) { ^ in file included /usr/include/openssl/bn.h:31:0, /usr/include/openssl/asn1.h:24, /usr/include/openssl/objects.h:916, /usr/include/openssl/evp.h:27, /usr/include/openssl/x509.h:23, /usr/include/openssl/x509v3.h:14, ossl.h:58, ossl_bn.c:11: /usr/include/openssl/bn.h:291:1: note: declared here deprecatedin_0_9_8(int ^ ossl_bn.c: in function ‘ossl_bn_is_prime_fasttest’: ossl_bn.c:916:5: warning: ‘bn_is_prime_fasttest’ deprecated [-wdeprecated-declarations] switch (bn_is_prime_fasttest(bn, checks, null, ossl_bn_ctx, null, do_trial_division)) { ^ in file included /usr/include/openssl/bn.h:31:0, /usr/include/openssl/asn1.h:24, /usr/include/openssl/objects.h:916, /usr/include/openssl/evp.h:27, /usr/include/openssl/x509.h:23, /usr/include/openssl/x509v3.h:14, ossl.h:58, ossl_bn.c:11: /usr/include/openssl/bn.h:295:1: note: declared here deprecatedin_0_9_8(int ^ ossl_bn.c: in function ‘ossl_bn_size’: ossl_bn.c:44:1: warning: control reaches end of non-void function [-wreturn-type] } ^ makefile:301: recipe target 'ossl_bn.o' failed
this known compatibility issue openssl , ruby 2.3.x.
the openssl extension of ruby version before 2.4 not compatible openssl 1.1.x. @ moment, linux distributions come openssl 1.1.0 have separate package openssl 1.0.x.
you need install earlier version of openssl or use ruby 2.4.x.
Comments
Post a Comment