简体   繁体   English

rvm安装ruby 1.8.4 openssl问题

[英]rvm installing ruby 1.8.4 openssl issues

I am trying to install ruby 1.8.4 and rails 2.3.2 on mac osx. 我正在尝试在Mac OS X上安装ruby 1.8.4和rails 2.3.2。 This is what is available on hosting I have purchased. 这是我购买的主机上可用的东西。 I am facing couple of issues related to installation. 我面临与安装相关的几个问题。 I was trying to install ruby 1.8.4 using rvm. 我试图使用rvm安装ruby 1.8.4。 When I try to use below command: 当我尝试使用以下命令时:

rvm install 1.8.4

I get below error: 我得到以下错误:

openssl_missing.h:68: error: conflicting types for 'HMAC_CTX_copy' /opt/local/include/openssl/hmac.h:102: error: previous declaration of 'HMAC_CTX_copy' was here openssl_missing.h:92: error: conflicting types for 'EVP_CIPHER_CTX_copy' /opt/local/include/openssl/evp.h:502: error: previous declaration of 'EVP_CIPHER_CTX_copy' was here make[1]: *** [ossl_cipher.o] Error 1 openssl_missing.h:68:错误:“ HMAC_CTX_copy”的类型冲突/opt/local/include/openssl/hmac.h:102:错误:先前的“ HMAC_CTX_copy”声明在这里openssl_missing.h:92:错误:冲突类型'EVP_CIPHER_CTX_copy'/opt/local/include/openssl/evp.h:502:错误:此处先前声明的'EVP_CIPHER_CTX_copy'是make [1]:*** [ossl_cipher.o]错误1

So I started searching a week ago. 因此,我一周前开始搜索。 Tried almost everything. 尝试了几乎所有东西。 Here are few links I have already tried: 这是我已经尝试过的几个链接:

Ruby and "You must recompile Ruby with OpenSSL support or change the sources in your Gemfile" Ruby和“您必须使用OpenSSL支持重新编译Ruby或更改Gemfile中的源”

RVM ruby on rails issue OpenSSL RVM ruby​​ on rails发布OpenSSL

Openssl error message on install log when installing ruby 1.9.3 on Mac OSX 10.6.8 在Mac OSX 10.6.8上安装ruby 1.9.3时,安装日志上出现Openssl错误消息

Error running 'make -j2' when running rvm install ruby-2.0.0-p247 运行rvm install ruby​​-2.0.0-p247时运行'make -j2'时出错

I was able to install ruby using below command: 我能够使用以下命令安装ruby:

rvm install 1.8.4 --with-openssl-dir=/opt/local

but when I tried rvm list. 但是当我尝试rvm list时。 It was saying broken next to 1.8.4. 有人说在1.8.4旁边跌破了。 After that I was not able to install rails. 之后,我无法安装滑轨。

I saw some posts on github that says that ruby installation requires openssl version 0.9.8. 我在github上看到一些帖子,其中说ruby安装需要openssl版本0.9.8。 But when I try installing openssl using below command: 但是当我尝试使用以下命令安装openssl时:

rvm pkg install openssl

It installs openssl 1.0.1. 它安装了openssl 1.0.1。

Few things want to make clear: 几件事想说清楚:

I had installed macports initially and then I had installed homebrew as well. 我最初安装了macports,然后还安装了自制软件。 which may be conflicting. 这可能会发生冲突。 But I am expecting they are not. 但是我希望他们不是。 But just to try I tried removing macports and reinstalling rvm. 但只是尝试尝试删除macports并重新安装rvm。 But when I tried below command : 但是当我尝试以下命令时:

rvm install 1.8.4

rvm installed macports for me. rvm为我安装了macports。 Not sure why. 不知道为什么。

Can anybody suggest me what I am missing here or may be I am doing it completely in a wrong way? 有人可以建议我在这里我所缺少的,还是我完全以错误的方式来做?

All ruby 1.8.* series is no more supported, you should drop the hosting that provides unsupported ruby version and request refund. 不再支持所有ruby 1.8.*系列,您应删除提供不受支持的ruby版本的主机并要求退款。

The currently supported ruby versions (as for today) are: 当前支持的红宝石版本(截至今天)是:

  • 1.9.3
  • 2.0.0

They both are mostly compatible (noticable exception is default UTF8 encoding in 2.0.0 ). 它们大多数都兼容(值得注意的例外是2.0.0默认UTF8编码)。

If you use RVM then you can use latest stable ruby release with this two commands: 如果使用RVM,则可以通过以下两个命令使用最新的稳定Ruby版本:

rvm get stable # update RVM
rvm use ruby --install --default

the --install will install ruby if missing, and the --default will set it as default for new shell sessions. --install将安装ruby(如果缺少),-- --default将其设置为新Shell会话的默认值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM