简体   繁体   中英

rvm install 1.8.7 returns " Error running '__rvm_make -j4' "

I am trying to install ruby 1.8.7 in Ubuntu 18.04.1 LTS. It Says "Error running '__rvm_make -j4',". It seems to be a openssl problem for me. But I am not sure how to fix it. Last 20 lines are copied below. Please help me to find a fix for installing 1.8.7

    Makefile:197: recipe for target 'ossl_pkey_rsa.o' failed
    make[1]: *** [ossl_pkey_rsa.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    Makefile:197: recipe for target 'ossl_engine.o' failed
    make[1]: *** [ossl_engine.o] Error 1
    Makefile:197: recipe for target 'ossl_pkey_ec.o' failed
    make[1]: *** [ossl_pkey_ec.o] Error 1
    ossl_x509attr.c: In function ‘ossl_x509attr_get_value’:
    ossl_x509attr.c:220:11: warning: implicit declaration of function ‘i2d_ASN1_SET_OF_ASN1_TYPE’; did you mean ‘i2d_ASN1_SET_ANY’? [-Wimplicit-function-declaration]
    length = i2d_ASN1_SET_OF_ASN1_TYPE(attr->value.set,
    ^~~~~~~~~~~~~~~~~~~~~~~~~
    i2d_ASN1_SET_ANY
    Makefile:197: recipe for target 'ossl_x509attr.o' failed
    make[1]: *** [ossl_x509attr.o] Error 1
    make[1]: Leaving directory '/usr/local/rvm/src/ruby-1.8.7-p374/ext/openssl'
    Makefile:293: recipe for target 'all' failed
    make: *** [all] Error 1
    +++ return 2

after so many atempts and googling I found the solution. Please run as root if you have installd rvm as root

root@sadiq-Aspire-315-51-z: rvm get head
Downloading https://get.rvm.io
Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc
Verifying /usr/local/rvm/archives/rvm-installer.asc
gpg: Signature made Sunday 30 December 2018 04:14:46 PM IST
gpg:                using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg: Good signature from "Piotr Kuczynski <piotr.kuczynski@gmail.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 7D2B AF1C F37B 13E2 069D  6956 105B D0E7 3949 9BDB
GPG verified '/usr/local/rvm/archives/rvm-installer'
Downloading https://github.com/rvm/rvm/archive/master.tar.gz
Upgrading the RVM installation in /usr/local/rvm/
Upgrade of RVM in /usr/local/rvm/ is complete.
  * Please do NOT forget to add your users to the rvm group.
     The installer no longer auto-adds root or users to the rvm group. Admins must do this.
     Also, please note that group memberships are ONLY evaluated at login time.
     This means that users must log out then back in before group membership takes effect!

Thanks for installing RVM 🙏
Please consider donating to our open collective to help us maintain RVM.

👉  Donate: https://opencollective.com/rvm/donate


RVM reloaded!
root@sadiq-Aspire-315-51-z:~# rvm install 1.8.7

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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