2017-03-02 141 views
1

我试图(重新)安装红宝石1.8.7使用rvm 1.29.1在一个全新的MBP运行OS X Sierra。我为了完成这项工作,我不能切换到更新的版本或任何不幸的东西。无法安装红宝石1.8.7 Mac OS X塞拉利昂

我有一个这样的功能安装,但在一个项目中得到一些奇怪的错误后,决定尝试一个完全干净的重新安装两个rvm(并最终自制!)(长篇故事 - 删除不需要的空间后有一个破碎的文件结构从我的主目录的名字!)。我小心地从这里的其他帖子中删除.bashrc,.profile等旧安装的所有痕迹。 2.4.0安装运行良好。然而,在尝试安装1.8.7:

9bxbniv1:~ Rob$ rvm install ruby-1.8.7 

Warning! Requested ruby installation which requires another ruby available - installing ruby-1.8.7-p374 first. 

ruby-1.8.7-p374 - #removing src/ruby-1.8.7-p374.. 
Checking requirements for osx. 
Certificates in '/usr/local/etc/[email protected]/cert.pem' are already up to date. 
Requirements installation successful. 
Installing Ruby from source to: /Users/Rob/.rvm/rubies/ruby-1.8.7-p374, this may take a while depending on your cpu(s)... 
ruby-1.8.7-p374 - #downloading ruby-1.8.7-p374, this may take a while depending on your connection... 
ruby-1.8.7-p374 - #extracting ruby-1.8.7-p374 to /Users/Rob/.rvm/src/ruby-1.8.7-p374.... 
ruby-1.8.7-p374 - #applying patch /Users/Rob/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch. 
ruby-1.8.7-p374 - #applying patch /Users/Rob/.rvm/patches/ruby/1.8.7/no_sslv2.diff. 
ruby-1.8.7-p374 - #applying patch /Users/Rob/.rvm/patches/ruby/GH-488.patch. 
ruby-1.8.7-p374 - #applying patch /Users/Rob/.rvm/patches/ruby/ssl_no_ec2m.patch. 
ruby-1.8.7-p374 - #configuring............................... 
ruby-1.8.7-p374 - #post-configuration. 
ruby-1.8.7-p374 - #compiling................................ 
Error running '__rvm_make -j 1', 
showing last 15 lines of /Users/Rob/.rvm/log/1488471654_ruby-1.8.7-p374/make.log 
          ^
openssl_missing.c:107:28: error: dereferencing pointer to incomplete type 
    EVP_MD_CTX_cleanup(&ctx->o_ctx); 
          ^
openssl_missing.c:108:28: error: dereferencing pointer to incomplete type 
    EVP_MD_CTX_cleanup(&ctx->md_ctx); 
          ^
In file included from /usr/include/string.h:192:0, 
       from openssl_missing.c:19: 
openssl_missing.c:109:27: error: invalid application of 'sizeof' to incomplete type 'HMAC_CTX' 
    memset(ctx, 0, sizeof(HMAC_CTX)); 
         ^
make[1]: *** [openssl_missing.o] Error 1 
make: *** [all] Error 1 
+++ return 2 
There has been an error while running make. Halting the installation. 

To proceed rvm requires a ruby-1.8.7-p374 compatible ruby is installed. 
We attempted to install it automatically but it failed with status 2. 
Please install it manually (or a compatible alternative) to proceed. 

我曾尝试一些Getting Ruby 1.8.7 installed on Mountain Lion (10.8)建议,但不幸的是,黑客是没有帮助的。 进一步展望以下消息的错误开始的日志文件:

In file included from openssl_missing.c:22:0: 
openssl_missing.h:79:35: error: macro "EVP_MD_CTX_create" passed 1 arguments, but takes just 0 
EVP_MD_CTX *EVP_MD_CTX_create(void); 
           ^
In file included from /usr/local/opt/[email protected]/include/openssl/x509.h:23:0, 
       from /usr/local/opt/[email protected]/include/openssl/x509_vfy.h:17, 
       from openssl_missing.c:16: 
/usr/local/opt/[email protected]/include/openssl/evp.h:501:51: error: expected declaration specifiers or '...' before '(' token 
# define EVP_MD_CTX_init(ctx) EVP_MD_CTX_reset((ctx)) 

搜索这个错误的第一行返回0结果就在这里。建议将受到感谢。

+0

看起来你需要得到阿霍德的是旧版本的OpenSSL反对 –

+1

链接@JimDeville这是一个很多比这更复杂。旧版本的OpenSSL甚至不太可能编译,这会导致更多的问题。 – tadman

回答

1

Ruby 1.8.7已经死了,不再支持任何现代macOS,所以你不能安装它。这个版本的Ruby在这一点上是历史遗留的,如果你确实需要运行它,你需要获得与之兼容的OS X,Linux或BSD的历史版本。

我的建议是使用Vagrant构建具有Linux或BSD的旧版本,可用于构建的Ruby 1.8.7的虚拟机。任何约会从2010年或更早的东西可能会工作,所以Ubuntu 10.04可能是一个很好的开始。

值得注意的是,Ruby Enterprise Edition是1.8.7版的一个变体,支持的时间比MRI 1.8.7更长,因此您可能在该版本中获得更多成功。它是在2012年

+0

感谢您的建议。令人激动的是,它与我以前的(否则是狡猾的)配置一起工作。在那里,区别是rvm使用了一种解决方法来避免我的主目录中的空间,在/中创建Rob.rvm,而不是/ Users/Rob。去图... – rwold

+1

'rvm'是一个很棒的工具,但是如果你不小心的话它会真的跑错。 – tadman

4

停产RVM的最新开发版本应该工作:

rvm get head 

我也Xcode更新8.2.1版本之前,我升级RVM,如果你不升级的XCode你需要启动它,并同意新的许可证或:

sudo xcodebuild -license 

我不得不升级我的酿造以及与做负荷得到它的工作,因为它没有被感动了很长一段时间。

我不确定你是否可以单独做一个。我现在正在运行。

我毁掉了我的RVM,因为我让它失去了控制。希望我刚刚修剪过它。现在就开始使用旧的Rails应用程序。

+0

完美!更新RVM确实起作用... – user3115056

+0

我得到的头,Xcode更新,然后错误: –

+0

警告:openssl 1.0.2l已安装 警告:已安装libyaml 0.1.7 警告:libffi 3.2.1已安装 苹果-gcc42:由于上游的不兼容性,此公式在MacOS 版本中的编译或功能不如预期。 错误:未满足的要求失败此构建。 –

0

我结束了使用时间机器恢复我的系统。但另一位同事有同样的问题,在新机器上进行设置了,发现

rvm install ruby -v 1.8.7--autolibs=enable 

有帮助的,如果碰到这个别人绊倒。

相关问题