Unable to install single user version of RVM

The question is very simple:

I cannot install RVM (single-user installation) as if I were following the instructions on the RVM website, namely:

$ curl -L https://get.rvm.io | bash -s stable 

I get permission rejected in line 360 โ€‹โ€‹of the script installation file (line starting with echo):

 # Perform the actual installation, first we obtain the source using whichever # means was specified, if any. Defaults to head. case "${version}" in (head) echo "${branch}" > "$rvm_path/RELEASE" install_head ${branch:-master} || exit $? ;; 

Here is the error message:

olivier @ ~ $ curl -L https://get.rvm.io | bash -s stable

bash: line 360: / usr / local / rvm / RELEASE: Permission denied

If I add "sudo" to "bash" in the above command, it works fine, but then it will be a multi-user installation ...

+6
source share
3 answers

In fact, I solved this by deleting the old versions of RVM: sudo rvm implode , and then deleting the /etc/rvmrc . Having done this, I can install the single-user version, and everything works fine!

Sorry, but I couldnโ€™t (the comment can be edited only after 5 minutes ... at least I supported ...).

+9
source

After installing a system-wide installation, you will not be able to run a single-user installation, as it will first detect your system installation and try to update it.

But you can install root, and then install the user by specifying the installation path:

curl -sSL https://get.rvm.io | bash -s stable - path $ HOME / .rvm

You will also have to manually install the user installation path on your user path, since RVM does not create it if you already have a system-wide installation (not really intended use):

 # .bashrc PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting 

And also load the rvm user:

 # .bash_profile [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* 
+5
source

Are you setting rvm_path to ~ / .rvmrc or to / etc / rvmrc or in one of your bash scripts? I would recommend deleting both of these files as well as ~ / .rvm, and then try installing rvm again WITHOUT sudo.

+2
source

Source: https://habr.com/ru/post/919221/


All Articles