ruby编译安装问题
Posted 物以稀为贵Fewfew
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ruby编译安装问题相关的知识,希望对你有一定的参考价值。
一、使用源码编译安装
二、使用rvm编译安装
上面两种安装方式安装ruby2.4.4和2.51均出现下列问题:
make[2]: Entering directory `/usr/local/rvm/src/ruby-2.4.4/ext/openssl'
compiling openssl_missing.c
In file included from openssl_missing.c:21:0:
openssl_missing.h:122:0: warning: "X509_STORE_get_ex_new_index" redefined [enabled by default]
# define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \
^
In file included from /usr/local/include/openssl/x509.h:309:0,
from /usr/local/include/openssl/engine.h:34,
from openssl_missing.c:14:
/usr/local/include/openssl/x509_vfy.h:320:0: note: this is the location of the previous definition
#define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \
^
In file included from /usr/local/include/openssl/bn.h:33:0,
from /usr/local/include/openssl/engine.h:23,
from openssl_missing.c:14:
openssl_missing.c: In function ‘ossl_HMAC_CTX_new’:
openssl_missing.c:132:43: error: invalid application of ‘sizeof’ to incomplete type ‘HMAC_CTX’
HMAC_CTX *ctx = OPENSSL_malloc(sizeof(HMAC_CTX));
^
openssl_missing.c:135:5: warning: implicit declaration of function ‘HMAC_CTX_init’ [-Wimplicit-function-declaration]
HMAC_CTX_init(ctx);
^
openssl_missing.c: In function ‘ossl_HMAC_CTX_free’:
openssl_missing.c:145:2: warning: implicit declaration of function ‘HMAC_CTX_cleanup’ [-Wimplicit-function-declaration]
HMAC_CTX_cleanup(ctx);
^
openssl_missing.c: In function ‘ossl_X509_CRL_get0_signature’:
openssl_missing.c:157:13: error: dereferencing pointer to incomplete type
*psig = crl->signature;
^
openssl_missing.c:159:13: error: dereferencing pointer to incomplete type
*palg = crl->sig_alg;
^
openssl_missing.c: In function ‘ossl_X509_REQ_get0_signature’:
openssl_missing.c:169:13: error: dereferencing pointer to incomplete type
*psig = req->signature;
^
openssl_missing.c:171:13: error: dereferencing pointer to incomplete type
*palg = req->sig_alg;
^
openssl_missing.c: At top level:
cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]
cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]
make[2]: *** [openssl_missing.o] Error 1
make[2]: Leaving directory `/usr/local/rvm/src/ruby-2.4.4/ext/openssl'
make[1]: *** [ext/openssl/all] Error 2
make[1]: Leaving directory `/usr/local/rvm/src/ruby-2.4.4'
make: *** [build-ext] Error 2
++ return 2
以上是关于ruby编译安装问题的主要内容,如果未能解决你的问题,请参考以下文章
Mac OS 10.7.5用RVM安装ruby失败?是gcc的问题吗