ceth
ceth

Reputation: 45325

RVM installation: `/usr/local/rvm': Permission denied

demas@demas:~$ sudo rm -rf /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm

demas@demas:~$ curl -L https://get.rvm.io | bash -s stable
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   184  100   184    0     0    218      0 --:--:-- --:--:-- --:--:--   308
100 13145  100 13145    0     0  12150      0  0:00:01  0:00:01 --:--:-- 12150
mkdir: cannot create directory `/usr/local/rvm': Permission denied

How can I fix it ?

Upvotes: 5

Views: 8360

Answers (3)

Matt
Matt

Reputation: 11

I added the sudo on the right side of the '|' before the bash` and it seems to work:

curl -sSL https://get.rvm.io | sudo bash -s -- --version latest**

Result: Downloading https://github.com/wayneeseguin/rvm/archive/1.26.10.tar.gz Downloading

Upvotes: 1

Yevgeniy Anfilofyev
Yevgeniy Anfilofyev

Reputation: 4847

As a quick variant of eliminating this problem you can create rvm directory and allow everyone to write to it:

sudo mkdir /usr/local/rvm; sudo chmod a+xwr /usr/local/rvm

Upvotes: 17

mpapis
mpapis

Reputation: 53188

you need to clean shell environment variables before start new installation, th easiest way is to logout and login again.

Upvotes: 3

Related Questions