Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install ruby-2.2.x in Centos 6.9 from rvm master without rvmsudo #4358

Closed
BrianHawley opened this issue Apr 6, 2018 · 5 comments
Closed
Milestone

Comments

@BrianHawley
Copy link
Contributor

BrianHawley commented Apr 6, 2018

Description

After updating rvm to master with rvmsudo (see #4356), I try to install a ruby version without rvmsudo, and it fails, complaining about a file in the current ruby version's directory - not the version to be installed. Seen in Centos 6.9 and 7.4.1708.

Steps to reproduce

rvmsudo rvm get master
rvm install ruby-2.2.10

Expected behavior

I expect ruby-2.2.10 to be installed without errors.

Actual behavior

The error is at the end of install.log:

./tool/rbinstall.rb:728:in `chmod': Operation not permitted @ chmod_internal - /usr/local/rvm/gems/ruby-2.4.3/ (Errno::EPERM)
	from ./tool/rbinstall.rb:728:in `block in <main>'
	from ./tool/rbinstall.rb:757:in `call'
	from ./tool/rbinstall.rb:757:in `block in <main>'
	from ./tool/rbinstall.rb:754:in `each'
	from ./tool/rbinstall.rb:754:in `<main>'
make: *** [do-install-nodoc] Error 1
++ return 2

Environment info

ruby-2.4.3:

  system:
    uname:        "Linux oceans-ci02.qa.sf.verticalresponse.com 2.6.32-696.18.7.el6.x86_64 #1 SMP Thu Jan 4 17:31:22 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux"
    name:         "CentOS"
    version:      "6"
    architecture: "x86_64"
    bash:         "/bin/bash => GNU bash, version 4.1.2(2)-release (x86_64-redhat-linux-gnu)"
    zsh:          " => not installed"
    remote_path:  "centos/6/x86_64"

  rvm:
    version:      "1.29.3 (master)"
    updated:      "17 hours 44 minutes 29 seconds ago"
    path:         "/usr/local/rvm"
    autolibs:     "[4] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."

  ruby:
    interpreter:  "ruby"
    version:      "2.4.3p205"
    date:         "2017-12-14"
    platform:     "x86_64-linux"
    patchlevel:   "2017-12-14 revision 61247"
    full_version: "ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]"

  homes:
    gem:          "/usr/local/rvm/gems/ruby-2.4.3"
    ruby:         "/usr/local/rvm/rubies/ruby-2.4.3"

  binaries:
    ruby:         "/usr/local/rvm/rubies/ruby-2.4.3/bin/ruby"
    irb:          "/usr/local/rvm/rubies/ruby-2.4.3/bin/irb"
    gem:          "/usr/local/rvm/rubies/ruby-2.4.3/bin/gem"
    rake:         "/usr/local/rvm/gems/ruby-2.4.3@global/bin/rake"

  environment:
    PATH:         "/usr/local/rvm/gems/ruby-2.4.3/bin:/usr/local/rvm/gems/ruby-2.4.3@global/bin:/usr/local/rvm/rubies/ruby-2.4.3/bin:/usr/lib64/qt-3.3/bin:/usr/pgsql-9.2/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/rvm/bin:/opt/sites/bin"
    GEM_HOME:     "/usr/local/rvm/gems/ruby-2.4.3"
    GEM_PATH:     "/usr/local/rvm/gems/ruby-2.4.3:/usr/local/rvm/gems/ruby-2.4.3@global"
    MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-2.4.3"
    IRBRC:        "/usr/local/rvm/rubies/ruby-2.4.3/.irbrc"
    RUBYOPT:      ""
    gemset:       ""
@BrianHawley BrianHawley changed the title Can't install a ruby from rvm master without rvmsudo Can't install a ruby in Centos 6.9 from rvm master without rvmsudo Apr 6, 2018
@BrianHawley BrianHawley changed the title Can't install a ruby in Centos 6.9 from rvm master without rvmsudo Can't install ruby-2.2.10 in Centos 6.9 from rvm master without rvmsudo Apr 6, 2018
@BrianHawley
Copy link
Contributor Author

OK, weird, I tried ruby-2.3.7, ruby-2.4.4, and ruby-2.5.1, and they all installed without this error. And then afterwards, when I tried to install ruby-2.2.10 again, it worked. I'm going to try other machines with the same setup.

@BrianHawley
Copy link
Contributor Author

BrianHawley commented Apr 6, 2018

I tried on other systems:

  • On the first, I tried to install ruby-2.2.10 (got the same error), removed it, installed ruby-2.3.7, then installed ruby-2.2.10 again, and it succeeded.
  • On the second, I installed ruby-2.3.7 first, then ruby-2.2.10, and it succeeded.
  • On the third, I installed ruby-2.1.10 first, then ruby-2.2.10, and it succeeded.
  • On the fourth, I installed ruby-2.2.8, and it failed with the same failure. So I removed ruby-2.2.8, installed ruby-2.0.0-p645, and installed ruby-2.2.8 again, and it succeeded.
  • On the fifth, I installed ruby-2.3.7 first in one session, then logged out, then logged back in and tried to install ruby-2.2.10, and it failed with the same failure.

So it looks like the problem is specific to ruby-2.2.x versions, and installing a version not-2.2.x first in the same login session makes later 2.2.x installs succeed.

It's possible that the reason it didn't fail in Centos 7.4.1708 is because before I installed 2.2.10, I installed 2.1.2 first. That makes more sense than it being a Centos 6 vs 7 issue.

@BrianHawley BrianHawley changed the title Can't install ruby-2.2.10 in Centos 6.9 from rvm master without rvmsudo Can't install ruby-2.2.x in Centos 6.9 from rvm master without rvmsudo Apr 6, 2018
@BrianHawley
Copy link
Contributor Author

Checked on a Centos 7.4.1708 box in a fresh session, and it failed with the same failure.

@BrianHawley
Copy link
Contributor Author

OK, figured it out: ruby-2.2.0 to 2.2.4 installs correctly, but 2.2.5 to 2.2.10 doesn't. Looks like the ruby 798 and rvm #3259 patch needs to apply to later 2.2.x versions. Making a PR.

BrianHawley added a commit to BrianHawley/rvm that referenced this issue Apr 17, 2018
BrianHawley added a commit to BrianHawley/rvm that referenced this issue Apr 17, 2018
Copied the ruby-2.2.4 patch to ruby-2.2.5 to ruby-2.2.10.

Fixes rvm#4358 .
@BrianHawley
Copy link
Contributor Author

Note that it doesn't fail on my single-user rvm install. I think it's limited to multi-user rvm.

@pkuczynski pkuczynski added this to the rvm-1.29.4 milestone Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants