问题
Possible Duplicate:
How do I fix a RVM install that was done using SUDO
I have created a user on my server 'myuser' . Logged into it and ran this cmd :
curl -L get.rvm.io | bash -s -- --auto-dotfiles
Everything fine and installed correctly.
Bymistake, I deleted the home directory using another user login, i.e /home/myuser (where rvm is installed) (logged in by other user 'anothuser').
Then lost rvm, so tried running the same install cmd , but now got this error :
curl -L get.rvm.io | bash -s -- --auto-dotfiles
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 185 100 185 0 0 349 0 --:--:-- --:--:-- --:--:-- 1094
100 10956 100 10956 0 0 10248 0 0:00:01 0:00:01 --:--:-- 10248
Turning on auto dotfiles mode.
mkdir: cannot create directory `/usr/local/rvm': Permission denied
So, I deleted the user , created again the same user and ran this command again, but again the same error .
回答1:
You need to clean old installation:
sudo rm -rf /etc/rvmrc /etc/profile.d/rvm.sh /usr/local/rvm
and restart to clean all loaded shell environment - it is required step
来源:https://stackoverflow.com/questions/14153005/rvm-installation-usr-local-rvm-permission-denied-before-this-i-deleted-ho