Ошибка установки ruby ​​1.8 в Ubuntu 18.04 - PullRequest
0 голосов
/ 02 мая 2018

Я удалил установленный ruby: sudo apt-get purge ruby и я скачать и скомпилировать 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

И создайте MakeFile, используя определенный компилятор.

make CC=gcc-4.4

Произошла ошибка при компиляции.

Ошибка при компиляции openssl

компиляция 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`

Как я могу устранить эту ошибку ..

1 Ответ

0 голосов
/ 25 июня 2018

Я столкнулся с очень похожей ошибкой при установке 1.9.3 в Ubuntu 18.04. Я сделал следующее, чтобы обойти это -

sudo apt install libssl1.0-dev

, а затем восстановил Руби.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...