rvm installation - /usr/local/rvm : permission denied (Before this, I deleted home directory by mistake in Ubuntu) [duplicate]

不想你离开。 提交于 2019-11-30 18:57:50

问题


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

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