Ruby 2.0.0 instal melalui RVM: kesalahan seputar openssl


8

Menggunakan: Mountain Lion 10.8.2,RVM 1.18.15

Mengalami masalah dengan, tampaknya , opensslketika mencoba menginstal Ruby 2.0.0 melalui 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

jadi saya brew install opensslmemperbarui openssl untuk 1.0.1eberharap itu akan membantu tetapi masih ada lebih banyak kesalahan (lihat "output panjang").

Jadi, gali sekitar Stack Exchange dan longgar mengikuti saran pada posting ini yang direkomendasikan rvm get head(sebagai lawan dari khas saya rvm get stable) dan perhatikan:

$ 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

Makhluk yang menarik cannot load such file -- openssl.

Apa yang menyebabkannya?

output panjang:

setelah memperbarui openssl ke 1.0.1.e via homebrew coba lagi tetapi untuk alasan apa pun 1.0.1c masih dirujuk:

$ 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

Saya memiliki masalah yang sama setelah memutakhirkan ke OSX Mavericks.
Hengjie

Jawaban:


16

Punya masalah yang sama. Coba yang berikut ini:

$ 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

apa, tepatnya, yang dilakukan --autolibs=3bendera? Saya tidak dapat menemukan dokumentasi apa pun tentangnya ...
Meltemi

FWIW- Saya mengikuti instruksi Anda, jenis: remove 2.0.0dan kemudian rvm get head(mengabaikan --autolibs=3bit). persyaratan diperiksa. BAIK. kemudian rvm install ruby-2.0.0. dan ... tidak ada masalah! Berhasil!
Meltemi

github.com/wayneeseguin/rvm/issues/1623 Ada beberapa info tentang autolibsflag, sejauh yang saya mengerti, ini memberitahu RVM cara menangani libs tambahan yang diperlukan.
Artem Pakk

Dokumentasi untuk autolibs dapat ditemukan dengan menjalankan cmd berikut: "rvm help autolibs" dari terminal
Jeremy Cade

Di bawah OSX 10.8: jugasudo brew install openssl
idonnie

0

Jadi ini berhasil bagi saya:

rvm pkg install openssl
rvm reinstall all --force

Saya juga mendapat rvm autolibs rvm_pkgdukungan readline.

Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.