2016-04-15 3 views
4

я получаю сообщение об ошибке при попытке установить 2.3 рубина на OSX Я обновил РВМ стабильной 1.27.0ошибки при установке рубина 2.3 на OSX

то, что я пытаюсь установить 2.3

% rvm install 2.3 
ruby-2.3.0 - #removing src/ruby-2.3.0 - please wait 
Searching for binary rubies, this might take some time. 
No binary rubies available for: osx/10.11/x86_64/ruby-2.3.0. 
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. 
Checking requirements for osx. 
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date. 
Requirements installation successful. 
Installing Ruby from source to: /Users/password123/.rvm/rubies/ruby-2.3.0, this may take a while depending on your cpu(s)... 
ruby-2.3.0 - #downloading ruby-2.3.0, this may take a while depending on your connection... 
ruby-2.3.0 - #extracting ruby-2.3.0 to /Users/password123/.rvm/src/ruby-2.3.0 - please wait 
ruby-2.3.0 - #configuring - please wait 
ruby-2.3.0 - #post-configuration - please wait 
ruby-2.3.0 - #compiling - please wait 
Error running '__rvm_make -j 1', 
showing last 15 lines of /Users/password123/.rvm/log/1460728216_ruby-2.3.0/make.log 
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
ossl_ssl.c:18:35: note: expanded from macro 'numberof' 
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0])) 
            ^~~~~ 
ossl_ssl.c:2266:21: error: invalid application of 'sizeof' to an incomplete type 'const struct (anonymous struct at ossl_ssl.c:85:14) []' 
    for (i = 0; i < numberof(ossl_ssl_method_tab); i++) { 
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
ossl_ssl.c:18:35: note: expanded from macro 'numberof' 
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0])) 
            ^~~~~ 
4 warnings and 10 errors generated. 
make[2]: *** [ossl_ssl.o] Error 1 
make[1]: *** [ext/openssl/all] Error 2 
make: *** [build-ext] Error 2 
+__rvm_make:0> return 2 
There has been an error while running make. Halting the installation. 

Не могли бы вы посоветовать мне какие-либо шаги по исправлению этой ошибки?

+0

Возможно, это связано с [this rbenv iss ие] (https://github.com/rbenv/ruby-build/issues/898)? –

ответ

5

на основе this rbenv discussion, я был в состоянии работать вокруг этого путем удаления, переустановкой и сила связей Homebrew OpenSSL:

brew uninstall --force openssl 
brew install openssl 
brew link --overwrite openssl --force 
rvm install 2.3.0 

Я чувствую себя лучше, если бы я знал, что побочные эффекты brew link могли бы иметь, но это сработало.

+0

Спасибо! Я только что сделал это! хотя я установил 2.3.1 в конце – Elmor

4

Он работал для меня:

Restart OSX, а затем

brew uninstall openssl 
brew unlink openssl098 
brew install openssl 
brew link --overwrite --force openssl 
rvm install 2.3.0 # (or rvm install 2.3.1) 

основе https://github.com/rvm/rvm/issues/3656

+0

Помогите, я снова. ПРИМЕЧАНИЕ. Вы можете игнорировать предупреждение (ссылка на brew --overwrite --force openssl): Внимание: отказ от ссылки: openssl Ссылка на кег-только openssl означает, что вы можете в конечном итоге связать себя с небезопасной, устаревшей системой OpenSSL при использовании заголовков от openbs от Homebrew. Вместо этого передайте полный путь include/library к вашему компилятору, например: -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib – blackchestnut

1

все еще получаю ту же ошибку после запуска линии упоминалось, Наконец я решил мою проблему, обновив hombrew, затем удалить и установить openssl, затем rvm install ruby ​​2.3 again

Смежные вопросы