Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot install RVM . Permission denied in /usr/local/rvm

Tags:

Based on my previous thread : RVM installed by Ruby not working? where i had installed RVM using the root user, I then had to entirely remove the RVM install and now i am installing as a user.

So i did :

  1. Create a new user by doing : useradd newuser
  2. Follow the instructions on the RVM website and execute the command : bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )

Now, i get the error : mkdir: cannot create directory `/usr/local/rvm': Permission denied

The new user i created does not have access to this directory. I manually tried creating the folder but the same error. Please help.

EDIT : The original problem occured because i did not restart the terminal and it was still using the old settings.

Now, I got a new problem : After installing RVM, i cannot run it and it gives me an error : rvm command not found.

Here is the output of my ~/.bash_profile

# .bash_profile  # Get the aliases and functions if [ -f ~/.bashrc ]; then         . ~/.bashrc fi  # User specific environment and startup programs  PATH=$PATH:$HOME/bin  export PATH [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session. 

And here is output from ~/.bashrc file

# .bashrc  # Source global definitions if [ -f /etc/bashrc ]; then         . /etc/bashrc fi  # User specific aliases and functions [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"  # This loads RVM into a shell session. 
like image 932
YD8877 Avatar asked Mar 09 '11 23:03

YD8877


1 Answers

mkdir: cannot create directory `/usr/local/rvm': Permission denied

If you've run the rvm installer as root previously, remove /usr/local/rvm and /etc/rvmrc.

like image 66
tristan Avatar answered Sep 28 '22 05:09

tristan