簡體   English   中英

學習足夠安裝的Ruby安裝失敗 - Puma gem安裝錯誤,Mac Sierra

[英]Ruby install fails for Learn Enough Setup - Puma gem install errors, Mac Sierra

我跑了寶石安裝puma,它失敗了這些錯誤。

我正在嘗試為Learn Enough Ruby Tutorial提供Ruby設置。

[developer]$gem install puma -v '3.4.0'
Building native extensions.  This could take a while...
ERROR:  Error installing puma:
    ERROR: Failed to build gem native extension.

    current directory: /Users/Jim/.rvm/gems/ruby-2.4.0@newgemset/gems/puma-3.4.0/ext/puma_http11
/Users/Jim/.rvm/rubies/ruby-2.4.0/bin/ruby -r ./siteconf20170530-50736-wm8q2m.rb extconf.rb
checking for BIO_read() in -lcrypto... yes
checking for SSL_CTX_new() in -lssl... yes
checking for openssl/bio.h... yes
creating Makefile

current directory: /Users/Jim/.rvm/gems/ruby-2.4.0@newgemset/gems/puma-3.4.0/ext/puma_http11
make "DESTDIR=" clean

current directory: /Users/Jim/.rvm/gems/ruby-2.4.0@newgemset/gems/puma-3.4.0/ext/puma_http11
make "DESTDIR="
compiling http11_parser.c
ext/http11/http11_parser.rl:111:17: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare]
  assert(pe - p == len - off && "pointers aren't same distance");
         ~~~~~~ ^  ~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
ext/http11/http11_parser.c:43:18: warning: unused variable 'puma_parser_en_main' [-Wunused-const-variable]
static const int puma_parser_en_main = 1;
                 ^
2 warnings generated.
compiling io_buffer.c
compiling mini_ssl.c
mini_ssl.c:90:5: error: incomplete definition of type 'struct dh_st'
  dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
  ~~^
/usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
mini_ssl.c:91:5: error: incomplete definition of type 'struct dh_st'
  dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
  ~~^
/usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
mini_ssl.c:93:10: error: incomplete definition of type 'struct dh_st'
  if ((dh->p == NULL) || (dh->g == NULL)) {
       ~~^
/usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
mini_ssl.c:93:29: error: incomplete definition of type 'struct dh_st'
  if ((dh->p == NULL) || (dh->g == NULL)) {
                          ~~^
/usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
mini_ssl.c:192:27: warning: 'DTLSv1_method' is deprecated [-Wdeprecated-declarations]
  conn->ctx = SSL_CTX_new(DTLSv1_method());
                          ^
/usr/local/opt/openssl@1.1/include/openssl/ssl.h:1630:45: note: 'DTLSv1_method' has been explicitly marked deprecated here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_method(void)) /* DTLSv1.0 */
                                            ^
mini_ssl.c:228:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
  int verify_err = SSL_get_verify_result(ssl);
      ~~~~~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~
mini_ssl.c:241:13: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
      err = ERR_get_error();
          ~ ^~~~~~~~~~~~~~~
3 warnings and 4 errors generated.
make: *** [mini_ssl.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/Jim/.rvm/gems/ruby-2.4.0@newgemset/gems/puma-3.4.0 for inspection.
Results logged to /Users/Jim/.rvm/gems/ruby-2.4.0@newgemset/extensions/x86_64-darwin-16/2.4.0/puma-3.4.0/gem_make.out
[developer]$gem install puma -v '3.4.0'
Building native extensions.  This could take a while...
ERROR:  Error installing puma:
    ERROR: Failed to build gem native extension.

    current directory: /Users/Jim/.rvm/gems/ruby-2.4.0@newgemset/gems/puma-3.4.0/ext/puma_http11
/Users/Jim/.rvm/rubies/ruby-2.4.0/bin/ruby -r ./siteconf20170530-51101-sgcz5z.rb extconf.rb
checking for BIO_read() in -lcrypto... yes
checking for SSL_CTX_new() in -lssl... yes
checking for openssl/bio.h... yes
creating Makefile

current directory: /Users/Jim/.rvm/gems/ruby-2.4.0@newgemset/gems/puma-3.4.0/ext/puma_http11
make "DESTDIR=" clean

current directory: /Users/Jim/.rvm/gems/ruby-2.4.0@newgemset/gems/puma-3.4.0/ext/puma_http11
make "DESTDIR="
compiling http11_parser.c
ext/http11/http11_parser.rl:111:17: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare]
  assert(pe - p == len - off && "pointers aren't same distance");
         ~~~~~~ ^  ~~~~~~~~~
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
                        ^
ext/http11/http11_parser.c:43:18: warning: unused variable 'puma_parser_en_main' [-Wunused-const-variable]
static const int puma_parser_en_main = 1;
                 ^
2 warnings generated.
compiling io_buffer.c
compiling mini_ssl.c
mini_ssl.c:90:5: error: incomplete definition of type 'struct dh_st'
  dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
  ~~^
/usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
mini_ssl.c:91:5: error: incomplete definition of type 'struct dh_st'
  dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
  ~~^
/usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
mini_ssl.c:93:10: error: incomplete definition of type 'struct dh_st'
  if ((dh->p == NULL) || (dh->g == NULL)) {
       ~~^
/usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
mini_ssl.c:93:29: error: incomplete definition of type 'struct dh_st'
  if ((dh->p == NULL) || (dh->g == NULL)) {
                          ~~^
/usr/local/opt/openssl@1.1/include/openssl/ossl_typ.h:104:16: note: forward declaration of 'struct dh_st'
typedef struct dh_st DH;
               ^
mini_ssl.c:192:27: warning: 'DTLSv1_method' is deprecated [-Wdeprecated-declarations]
  conn->ctx = SSL_CTX_new(DTLSv1_method());
                          ^
/usr/local/opt/openssl@1.1/include/openssl/ssl.h:1630:45: note: 'DTLSv1_method' has been explicitly marked deprecated here
DEPRECATEDIN_1_1_0(__owur const SSL_METHOD *DTLSv1_method(void)) /* DTLSv1.0 */
                                            ^
mini_ssl.c:228:20: warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
  int verify_err = SSL_get_verify_result(ssl);
      ~~~~~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~
mini_ssl.c:241:13: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
      err = ERR_get_error();
          ~ ^~~~~~~~~~~~~~~
3 warnings and 4 errors generated.
make: *** [mini_ssl.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/Jim/.rvm/gems/ruby-2.4.0@newgemset/gems/puma-3.4.0 for inspection.
Results logged to /Users/Jim/.rvm/gems/ruby-2.4.0@newgemset/extensions/x86_64-darwin-16/2.4.0/puma-3.4.0/gem_make.out

我怎么解決這個問題?

嘗試運行舊版本並嘗試以下命令:

gem install puma -v '3.3.0' -- --with-opt-dir=/usr/local/opt/openssl

完成后再嘗試運行bundle install。

您還可以考慮檢查是否安裝了OpenSSL。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM