2016-02-26 281 views
2

您可能正在尋找運行錯誤「__rvm_make -j 1」
這只是說,雖然編制紅寶石出事了。此問題僅與您有關,如果openssl和/或ossl_ssl是您的錯誤消息的一部分。
但也許你的問題是類似之一,你可以解決你的問題與一些定製。在rvm Ruby安裝期間運行'__rvm_make -j 1'時出錯| OpenSSL的錯誤


背景
今天,我想刪除項目的所有寶石卻忘了指定捆綁的路徑預先那麼,安裝在~/.rvm/gems/ruby-2.2.4/gems/所有寶石。

因爲它是唯一的紅寶石2.2.4項目,我雖然rm -rf ~/.rvm/gems/ruby-2.2.4/gems/*將會很好。事實並非如此。 Bundler不見了,gem install bundler也沒有工作了。

我刪除了洞紅寶石安裝rvm remove ruby-2.2.4螞蟻試圖重新安裝它。這是我得到了錯誤的控制檯輸出:

控制檯輸出

> rvm install ruby-2.2.4 
Searching for binary rubies, this might take some time. 
No binary rubies available for: osx/10.11/x86_64/ruby-2.2.4. 
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/fkammer/.rvm/rubies/ruby-2.2.4, this may take a while depending on your cpu(s)... 
ruby-2.2.4 - #downloading ruby-2.2.4, this may take a while depending on your connection... 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 12.7M 100 12.7M 0  0 655k  0 0:00:19 0:00:19 --:--:-- 234k 
No checksum for downloaded archive, recording checksum in user configuration. 
ruby-2.2.4 - #extracting ruby-2.2.4 to /Users/fkammer/.rvm/src/ruby-2.2.4.... 
ruby-2.2.4 - #configuring.......................................................... 
ruby-2.2.4 - #post-configuration. 
ruby-2.2.4 - #compiling.............................................................. 
Error running '__rvm_make -j 1', 
showing last 15 lines of /Users/fkammer/.rvm/log/1456431932_ruby-2.2.4/make.log 
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
ossl_ssl.c:19:35: note: expanded from macro 'numberof' 
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0])) 
            ^~~~~ 
ossl_ssl.c:2217:21: error: invalid application of 'sizeof' to an incomplete type 'const struct (anonymous struct at ossl_ssl.c:115:14) []' 
    for (i = 0; i < numberof(ossl_ssl_method_tab); i++) { 
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
ossl_ssl.c:19:35: note: expanded from macro 'numberof' 
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0])) 
            ^~~~~ 
9 errors generated. 
make[2]: *** [ossl_ssl.o] Error 1 
make[1]: *** [ext/openssl/all] Error 2 
make: *** [build-ext] Error 2 
++ return 2 
There has been an error while running make. Halting the installation. 

重試不會改變任何東西。我也嘗試徹底卸載rvm(rvm implode)並重新安裝它,但那不成功。

系統
的Mac OS X - 埃爾卡皮坦(10.11.3)
RVM 11年1月26日(最新)
家釀0.9.5

回答

3

貌似有使用OpenSSL問題。

rvm在我的安裝中使用自制軟件作爲其包管理器(這是我猜測的默認設置)。您可以確保與rvm autolibs homebrew

我重新安裝OpenSSL的

brew reinstall openssl 

,並通過brew list有另一OpenSSL軟件包叫做openssl098安裝我的系統上看到。試圖重新安裝它也導致了以下錯誤:

> brew reinstall openssl098 
Error: No available formula with the name "openssl098" 

我只是刪除了包

brew uninstall --force openssl098 

,再重新安裝OpenSSL的以確保openssl098不是一個需要依賴。但它沒有再次安裝。

然後我試着安裝ruby-2.2。4通過rvm再次,它的工作就像一個魅力:)所以我想我的openssl軟件包因爲某種原因被打破。

1

openssl098已經officially removed並且不再可用。最有可能你有rvm的過期版本,它試圖根據0.9.8分支構建。更新rvm將其修復:rvm get headSource

+0

只是重新安裝'rvm'沒有爲我工作不幸 –

0

我試圖安裝Ruby 1.9.3,但有錯誤原樣 錯誤運行「__rvm_make -j4」

我跟着@mpapis並得到了我的問題解決

rvm remove 1.9.3 
CC=clang rvm install 1.9.3 

現在我有這個設置 -

rvm rubies 
    ruby-1.9.3-p551 [ x86_64 ] 
    ruby-2.1.3 [ x86_64 ] 
=* ruby-2.3.1 [ x86_64 ] 

# => - current 
# =* - current && default 
# * - default 

這裏是源鏈路 https://github.com/rvm/rvm/issues/
&這是我的報價 - https://github.com/rvm/rvm/issues/2333

0

這是爲我工作的。我總是忘記這樣做。一次性的事情。

xcode-select --install 
相關問題