ruby编译安装问题

Posted 物以稀为贵Fewfew

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ruby编译安装问题相关的知识,希望对你有一定的参考价值。

一、使用源码编译安装

二、使用rvm编译安装

上面两种安装方式安装ruby2.4.4和2.51均出现下列问题:

  1. make[2]: Entering directory `/usr/local/rvm/src/ruby-2.4.4/ext/openssl'

  2. compiling openssl_missing.c

  3. In file included from openssl_missing.c:21:0:

  4. openssl_missing.h:122:0: warning: "X509_STORE_get_ex_new_index" redefined [enabled by default]

  5.  #  define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \

  6.  ^

  7. In file included from /usr/local/include/openssl/x509.h:309:0,

  8.                  from /usr/local/include/openssl/engine.h:34,

  9.                  from openssl_missing.c:14:

  10. /usr/local/include/openssl/x509_vfy.h:320:0: note: this is the location of the previous definition

  11.  #define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \

  12.  ^

  13. In file included from /usr/local/include/openssl/bn.h:33:0,

  14.                  from /usr/local/include/openssl/engine.h:23,

  15.                  from openssl_missing.c:14:

  16. openssl_missing.c: In function ‘ossl_HMAC_CTX_new’:

  17. openssl_missing.c:132:43: error: invalid application of ‘sizeof’ to incomplete type ‘HMAC_CTX’

  18.      HMAC_CTX *ctx = OPENSSL_malloc(sizeof(HMAC_CTX));

  19.                                            ^

  20. openssl_missing.c:135:5: warning: implicit declaration of function ‘HMAC_CTX_init’ [-Wimplicit-function-declaration]

  21.      HMAC_CTX_init(ctx);

  22.      ^

  23. openssl_missing.c: In function ‘ossl_HMAC_CTX_free’:

  24. openssl_missing.c:145:2: warning: implicit declaration of function ‘HMAC_CTX_cleanup’ [-Wimplicit-function-declaration]

  25.   HMAC_CTX_cleanup(ctx);

  26.   ^

  27. openssl_missing.c: In function ‘ossl_X509_CRL_get0_signature’:

  28. openssl_missing.c:157:13: error: dereferencing pointer to incomplete type

  29.   *psig = crl->signature;

  30.              ^

  31. openssl_missing.c:159:13: error: dereferencing pointer to incomplete type

  32.   *palg = crl->sig_alg;

  33.              ^

  34. openssl_missing.c: In function ‘ossl_X509_REQ_get0_signature’:

  35. openssl_missing.c:169:13: error: dereferencing pointer to incomplete type

  36.   *psig = req->signature;

  37.              ^

  38. openssl_missing.c:171:13: error: dereferencing pointer to incomplete type

  39.   *palg = req->sig_alg;

  40.              ^

  41. openssl_missing.c: At top level:

  42. cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default]

  43. cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default]

  44. cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default]

  45. cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default]

  46. make[2]: *** [openssl_missing.o] Error 1

  47. make[2]: Leaving directory `/usr/local/rvm/src/ruby-2.4.4/ext/openssl'

  48. make[1]: *** [ext/openssl/all] Error 2

  49. make[1]: Leaving directory `/usr/local/rvm/src/ruby-2.4.4'

  50. make: *** [build-ext] Error 2

  51. ++ return 2

以上是关于ruby编译安装问题的主要内容,如果未能解决你的问题,请参考以下文章

Mac OS 10.7.5用RVM安装ruby失败?是gcc的问题吗

Mac OS 10.7.5用RVM安装ruby失败?是gcc的问题吗

sass学习笔记:sass在windows下的安装编译

Linux 安装ruby编译环境

CentOS7安装ruby2.6.3

本地安装sass出错问题解析