Installazione di Ruby 2.0.0 tramite RVM: errori relativi a openssl


8

Usando: Mountain Lion 10.8.2,RVM 1.18.15

Problemi con, a quanto pare , opensslquando si tenta di installare Ruby 2.0.0 tramite RVM:

$ rvm install 2.0.0
...
Extracting openssl to /Users/meltemi/.rvm/src/openssl-1.0.1c
Configuring openssl in /Users/meltemi/.rvm/src/openssl-1.0.1c.
Error running './Configure darwin64-x86_64-cc -I/Users/meltemi/.rvm/usr/include -L/Users/meltemi/.rvm/usr/lib zlib no-asm no-krb5 --prefix=/Users/meltemi/.rvm/usr no-shared ', please read /Users/meltemi/.rvm/log/ruby-2.0.0-p0/openssl/configure.log
Compiling openssl in /Users/meltemi/.rvm/src/openssl-1.0.1c.
Error running 'make', please read /Users/meltemi/.rvm/log/ruby-2.0.0-p0/openssl/make.log

quindi brew install opensslaggiorno openssl 1.0.1esperando che possa essere d'aiuto, ma c'erano ancora più errori (vedi "output lungo").

Quindi, scavato intorno a Stack Exchange e seguito vagamente il suggerimento su questo post che ha raccomandato rvm get head(al contrario del mio tipico rvm get stable) e notato:

$ rvm get head
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
...
100 1620k  100 1620k    0     0   275k      0  0:00:05  0:00:05 --:--:--  479k

Upgrading the RVM installation in /Users/meltemi/.rvm/
    RVM PATH line found in /Users/meltemi/.bashrc /Users/meltemi/.zshrc.
    RVM sourcing line found in /Users/meltemi/.bash_profile /Users/meltemi/.zshrc.
    Installing rvm gem in 1 gemsets ERROR:  Loading command: install (LoadError)
    cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

Un po 'interessante cannot load such file -- openssl.

Cosa dà?

uscita lunga:

dopo l'aggiornamento si apre a 1.0.1.e tramite homebrew riprovato ma per qualsiasi motivo si fa ancora riferimento a 1.0.1c:

$ rvm reinstall 2.0.0 --with-openssl-dir=/usr/local          
Removing /Users/meltemi/.rvm/src/ruby-2.0.0-p0...
Removing /Users/meltemi/.rvm/rubies/ruby-2.0.0-p0...
Fetching openssl-1.0.1c.tar.gz to /Users/meltemi/.rvm/archives
Extracting openssl to /Users/meltemi/.rvm/src/openssl-1.0.1c
Configuring openssl in /Users/meltemi/.rvm/src/openssl-1.0.1c.
Error running './Configure darwin64-x86_64-cc -I/Users/meltemi/.rvm/usr/include -L/Users/meltemi/.rvm/usr/lib zlib no-asm no-krb5 --prefix=/Users/meltemi/.rvm/usr --with-openssl-dir=/usr/local no-shared ', please read /Users/meltemi/.rvm/log/ruby-2.0.0-p0/openssl/configure.log
Compiling openssl in /Users/meltemi/.rvm/src/openssl-1.0.1c.
Error running 'make', please read /Users/meltemi/.rvm/log/ruby-2.0.0-p0/openssl/make.log

Please note that it's required to reinstall all rubies:

    rvm reinstall all --force

Updating openssl certificates
Error running 'update_openssl_certs', please read /Users/meltemi/.rvm/log/ruby-2.0.0-p0/openssl.certs.log
Installing Ruby from source to: /Users/meltemi/.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 - #extracting ruby-2.0.0-p0 to /Users/meltemi/.rvm/src/ruby-2.0.0-p0
ruby-2.0.0-p0 - #extracted to /Users/meltemi/.rvm/src/ruby-2.0.0-p0
ruby-2.0.0-p0 - #configuring
ruby-2.0.0-p0 - #compiling
ruby-2.0.0-p0 - #installing 
Removing old Rubygems files...
Installing rubygems-2.0.0 for ruby-2.0.0-p0 ...
Error running 'env GEM_PATH=/Users/meltemi/.rvm/gems/ruby-2.0.0-p0:/Users/meltemi/.rvm/gems/ruby-2.0.0-p0@global:/Users/meltemi/.rvm/gems/ruby-2.0.0-p0:/Users/meltemi/.rvm/gems/ruby-2.0.0-p0@global GEM_HOME=/Users/meltemi/.rvm/gems/ruby-2.0.0-p0 /Users/meltemi/.rvm/rubies/ruby-2.0.0-p0/bin/ruby /Users/meltemi/.rvm/src/rubygems-2.0.0/setup.rb', please read /Users/meltemi/.rvm/log/ruby-2.0.0-p0/rubygems.install.log
Installation of rubygems did not complete successfully.
Saving wrappers to '/Users/meltemi/.rvm/bin'.
ruby-2.0.0-p0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-2.0.0-p0 - #importing default gemsets, this may take time ...
Install of ruby-2.0.0-p0 - #complete 
Making gemset ruby-2.0.0-p0 pristine.
Error running '' under ,
please read /Users/meltemi/.rvm/log/ruby-2.0.0-p0/gemset.pristine.log
Making gemset ruby-2.0.0-p0@global pristine.
Error running '' under ,
please read /Users/meltemi/.rvm/log/ruby-2.0.0-p0/gemset.pristine.log

Ho avuto lo stesso problema dopo l'aggiornamento a OSX Mavericks.
Hengjie,

Risposte:


16

Ho avuto lo stesso problema. Prova quanto segue:

$ rvm remove 2.0.0 # get rid of unsuccessful installation
$ rvm get head --autolibs=3 # get the latest RVM and build required libs
$ rvm requirements # just in case, install all other required stuff
$ rvm install ruby-2.0.0
$ rvm --default use ruby-2.0.0

cosa fa esattamente la --autolibs=3bandiera? Non riesco a trovare alcuna documentazione al riguardo ...
Meltemi

FWIW- Ho seguito le tue istruzioni, in un certo senso: remove 2.0.0e poi rvm get head(ignorando il --autolibs=3bit). requisiti controllati. OK. allora rvm install ruby-2.0.0. e ... nessun problema! Ha funzionato!
Meltemi

github.com/wayneeseguin/rvm/issues/1623 Ci sono alcune informazioni su autolibsflag, per quanto ho capito, dice a RVM come gestire le librerie aggiuntive richieste.
Artem Pakk,

La documentazione per gli autolibri può essere trovata eseguendo il seguente cmd: "rvm help autolibs" dal terminale
Jeremy Cade,

Sotto OSX 10.8: anchesudo brew install openssl
idonnie

0

Quindi questo ha funzionato per me:

rvm pkg install openssl
rvm reinstall all --force

Ho anche avuto il rvm autolibs rvm_pkgsupporto per readline.

Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.