김다희
김다희

Reputation: 1

Error installing ruby 1.8 in ubuntu 18.04

I removed installed ruby: sudo apt-get purge ruby and I Download and compile ruby:

wget http://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p374.tar.gz
tar -xzvf ruby-1.8.7-p374.tar.gz
cd ruby-1.8.7-p374
./configure

AND Build a MakeFile using the specific compiler.

make CC=gcc-4.4

An error occurred when compiling.

Error in compiling openssl

compiling openssl

make[1]: 디렉터리 '/ruby-1.8.7-p374/ext/openssl' 들어감
gcc-4.4 -I. -I../.. -I../../. -I../.././ext/openssl - 
DRUBY_EXTCONF_H=\"extconf.h\"    -fPIC -g -O2    -c ossl_hmac.c
In file included from ossl.h:57,
             from ossl_hmac.c:13:
/usr/include/openssl/asn1_mac.h:10: error: #error "This file is obsolete; 
please update your software."
In file included from ossl.h:205,
             from ossl_hmac.c:13:
openssl_missing.h:79: error: macro "EVP_MD_CTX_create" passed 1 arguments, but takes just 0
openssl_missing.h:83: error: expected declaration specifiers or ‘...’ before ‘(’ token
openssl_missing.h:83: error: conflicting types for ‘EVP_MD_CTX_reset’
/usr/include/openssl/evp.h:498: note: previous declaration of 
‘EVP_MD_CTX_reset’ was here
openssl_missing.h:91: error: expected declaration specifiers or ‘...’ before ‘(’ token
ossl_hmac.c: In function ‘ossl_hmac_alloc’:
ossl_hmac.c:54: error: invalid application of ‘sizeof’ to incomplete type ‘HMAC_CTX’ 
ossl_hmac.c:54: error: invalid application of ‘sizeof’ to incomplete type ‘HMAC_CTX’ `enter code here`
ossl_hmac.c: In function ‘ossl_hmac_initialize’:
ossl_hmac.c:73: warning: ‘HMAC_Init’ is deprecated (declared at /usr/include/openssl/hmac.h:28)
ossl_hmac.c: In function ‘hmac_final’:
ossl_hmac.c:114: error: storage size of ‘final’ isn’t known
ossl_hmac.c: In function ‘ossl_hmac_reset’:
ossl_hmac.c:182: warning: ‘HMAC_Init’ is deprecated (declared at /usr/include/openssl/hmac.h:28)
Makefile:197: recipe for target 'ossl_hmac.o' failed
make[1]: *** [ossl_hmac.o] Error 1
make[1]: DIR '/ruby-1.8.7-p374/ext/openssl' 나감
Makefile:293: recipe for target 'all' failed
make: *** [all] Error 1`

How can i resolve this error..

Upvotes: 0

Views: 1320

Answers (1)

danw
danw

Reputation: 134

I ran into a very similar error installing 1.9.3 on Ubuntu 18.04. I did the following to get around it -

sudo apt install libssl1.0-dev

and then rebuilt Ruby.

Upvotes: 2

Related Questions