2013-03-02 102 views
6

安装RVM(首先对不起我的英语)使错误 - 在Snow Leopard上

我想对我的雪豹10.6.8安装RVM,使用此:

\curl -L https://get.rvm.io | bash -s stable --ruby

而且我得到这个错误:

Installing Ruby from source to: /Users/Villa/.rvm/rubies/ruby-2.0.0-p0, this may take a while depending on your cpu(s)... 
ruby-2.0.0-p0 - #downloading ruby-2.0.0-p0, this may take a while depending on your connection... 
ruby-2.0.0-p0 - #extracted to /Users/Villa/.rvm/src/ruby-2.0.0-p0 (already extracted) 
ruby-2.0.0-p0 - #configuring 
ruby-2.0.0-p0 - #compiling 
Error running 'make -j2', please read /Users/Villa/.rvm/log/ruby-2.0.0-p0/make.log 
There has been an error while running make. Halting the installation. 

而且make.log里的错误就从这里开始:

In file included from openssl_missing.c:22: 
openssl_missing.h:71: error: conflicting types for ‘HMAC_CTX_copy’ 
/Users/Villa/.rvm/usr/include/openssl/hmac.h:102: error: previous declaration of  ‘HMAC_CTX_copy’ was here 
openssl_missing.h:95: error: conflicting types for ‘EVP_CIPHER_CTX_copy’ 
/Users/Villa/.rvm/usr/include/openssl/evp.h:503: error: previous declaration of ‘EVP_CIPHER_CTX_copy’ was here 
openssl_missing.c:27: error: conflicting types for ‘HMAC_CTX_copy’ 
/Users/Villa/.rvm/usr/include/openssl/hmac.h:102: error: previous declaration of ‘HMAC_CTX_copy’ was here 
openssl_missing.c:122: error: conflicting types for ‘EVP_CIPHER_CTX_copy’ 
/Users/Villa/.rvm/usr/include/openssl/evp.h:503: error: previous declaration of ‘EVP_CIPHER_CTX_copy’ was here 
make[2]: *** [openssl_missing.o] Error 1 
make[1]: *** [ext/openssl/all] Error 2 
make[1]: *** Waiting for unfinished jobs.... 
compiling psych_emitter.c 
compiling psych_parser.c 
compiling psych_to_ruby.c 
compiling psych_yaml_tree.c 
linking shared-object psych.bundle 
installing default psych libraries 
make: *** [build-ext] Error 2 

请告诉我你想从我需要得到一个解决方案的所有

更新#1

我尝试安装它这样做的:

rvm reinstall 1.9.3 --with-openssl-dir=/usr/bin

我得到这个

Error running '__rvm_rm_rf /Users/Villa/.rvm/src/ruby-1.9.3-p392', 
please read /Users/Villa/.rvm/log/ruby-1.9.3-p392/remove.src.log 
/Users/Villa/.rvm/rubies/ruby-1.9.3-p392 has already been removed. 
Installing requirements for osx/10.6/i386, might require sudo password 
Skipping `brew update` make sure your formulas are up to date. 
-bash: /usr/local/etc/openssl/cert.pem: Permission denied 
-bash: /usr/local/etc/openssl/cert.pem: Permission denied 
Doing /usr/local/etc/openssl 
cert.pem => 77ee3751.0 
Installing Ruby from source to: /Users/Villa/.rvm/rubies/ruby-1.9.3-p392, this may take a while depending on your cpu(s)... 
ruby-1.9.3-p392 - #downloading ruby-1.9.3-p392, this may take a while depending on your connection... 
ruby-1.9.3-p392 - #extracted to /Users/Villa/.rvm/src/ruby-1.9.3-p392 (already extracted) 
ruby-1.9.3-p392 - #configuring... 
Error running './configure --prefix=/Users/Villa/.rvm/rubies/ruby-1.9.3-p392 --with- openssl-dir=/usr/bin --with-opt- dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libxml2:/usr/local/opt/lib xslt:/usr/local/opt/libksba:/usr/local/opt/openssl:/usr/local/opt/sqlite --disable- install-doc --without-tcl --without-tk --enable-shared', 
please read /Users/Villa/.rvm/log/ruby-1.9.3-p392/configure.log 
There has been an error while running configure. Halting the installation. 

谢谢!

+0

你使用MacPort或自制软件吗?你有没有安装openssl? – gmaliar 2013-03-02 19:04:03

+0

我正在使用自制软件,是的,我已安装openssl-1.0.1e – Villat 2013-03-02 19:16:05

回答

5

尝试使用安装的openssl版本的位置与--with-openssl-dir=/path/to/openssl一起安装。

更多了,你可以看看这个https://rvm.io/packages/openssl/

+0

对不起,我不确定哪个是我的openssl的位置,我怎么能找到它? – Villat 2013-03-02 19:45:40

+2

在终端,'哪openssl' – gmaliar 2013-03-02 19:46:47

+0

我已经更新了我的原始问题的结果 – Villat 2013-03-02 20:16:25

0

我得到了我用下面的代码我对MacRuby的网站上发现的工作:

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/ 

如果您使用的是Xcode的版本高于4.3本将配置安装路径。