skip to Main Content

I am trying to install ruby using rvm.

The user I am installing as is go

[go@ci-qa1 ~]$ whoami
go

I initially fetch the keys –

curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
gpg: key D39DC0E3: "Michal Papis (RVM signing) <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
(honeymaker_venv) [go@ci-qa1 ~]$ curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
gpg: key 39499BDB: "Piotr Kuczynski <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

and for install –

curl -sSL https://get.rvm.io | bash -s stable --ruby
Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc
gpg: Signature made Sat 16 Jan 2021 12:16:22 AM IST using RSA key ID 39499BDB
gpg: Good signature from "Piotr Kuczynski <[email protected]>"
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 '/home/go/.rvm/archives/rvm-1.29.12.tgz'
Upgrading the RVM installation in /home/go/.rvm/
    RVM PATH line found in /home/go/.mkshrc /home/go/.profile /home/go/.zshrc.
    RVM PATH line not found for Bash, rerun this command with '--auto-dotfiles' flag to fix it.
    RVM sourcing line found in /home/go/.profile /home/go/.zlogin.
    RVM sourcing line not found for Bash, rerun this command with '--auto-dotfiles' flag to fix it.
Upgrade of RVM in /home/go/.rvm/ is complete.

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

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


Ruby enVironment Manager 1.29.12 (latest) (c) 2009-2020 Michal Papis, Piotr Kuczynski, Wayne E. Seguin

Searching for binary rubies, this might take some time.
No binary rubies available for: centos/7/x86_64/ruby-3.0.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for centos.
Installing requirements for centos.
Installing required packages: ruby...go password required for 'yum install -y ruby': 

Why is it asking for password? I have read multiple pther stackoverflow answers saying not to install as root. How do I fix this ?

If I disable autolibs –

Checking requirements for centos.
Missing required packages: ruby
RVM autolibs is now configured with mode '2' =>
  'Allow RVM to use package manager if found, fail if dependencies are missing. This is default.',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm.io/rvm/autolibs for more information.
Requirements installation failed with status: 1.

2

Answers


  1. Chosen as BEST ANSWER

    For some reason if I disable autolibs and run it fails with the erro mentioned in the question. But if I run it with this command

    curl -L get.rvm.io | bash -s -- --ignore-dotfiles --autolibs=0 --ruby
    

    which I am assuming does the same disabling of autolibs, it works.

    Note: The above command does not setup rvm in the bash because of the autolib disable I think. So that step has to be done manually.


  2. We have 3 ways to install ruby into centOS

    1. Installing Ruby from the YUM package manager.
    2. Installing Ruby using rvm.
    3. Installing Ruby using rbenv.

    You are getting the error because the minimum ruby is required to install rvm (and also signature issues).

    There are few dependencies to install ruby using rvm into centOs.
    Please make sure you have installed all these dependencies before installing rvm.

    sudo yum install ruby git libreadline-dev zlib1g-dev libreadline-dev libncurses5-dev autoconf bison libssl-dev build-essential libyaml-dev libffi-dev libssl-dev libreadline-dev zlib1g-dev libgdbm-dev
    

    Please let me know if you still getting any errors.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search