Why rvm install 2.0.0 asks for sudo password?

吃可爱长大的小学妹 提交于 2019-12-08 19:34:42

问题


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



来源:https://stackoverflow.com/questions/19082550/why-rvm-install-2-0-0-asks-for-sudo-password

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!