Why rvm install 2.0.0 asks for sudo password?

2019-06-20 01:38发布

问题:

I'm trying to install ruby 2.0.0-p247 through rvm. But, it is asking for password. Is it normal to provide sudo password? I've not configured sudo password in sudoers file. I'm using Oracle Enterprise Linux 6 x64 .

回答1:

The sudo is for autolibs - which means RVM will install the required software like openssh or libyaml which are required for standard ruby to work properly.

You can change the autolibs to see the required packages instead of installing them:

rvm autolibs read-fail

and to get back to the default which installs requirements:

rvm autolibs reset


回答2:

This is from the RVM documentation for multiple user installations:

However, once the install is complete, and the instructions to add users to the rvm group is followed, the use of either sudo or rvmsudo is no longer required. The 'sudo' command is only to temporarily elevate privileges so the installer can complete it's work. If you need to use 'sudo' or 'rvmsudo' after the install is complete, some part of the install directions were not properly followed. This usually is because people execute the install as root, rather than executing the installation instructions from a non-privileged user account.

Those last two sentences are very important.

RVM is designed to be used as a single-user tool, installed in their home directory, and, if installed that way NEVER needs sudo to run or install or change anything, nor will the user ever have to do things as root.

The "Troubleshooting Your Install" section in the installation documentation page is a good starting point for you.



回答3:

Just do "sudo rvm ...." then type in your password



标签: ruby rvm