2016-02-26 280 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 
相关问题