简体   繁体   中英

install rvm “bash /root/.rvm/scripts/rvm No such file or directory”

I want to install RVM in ubuntu and I am following these steps

root@jaskaran-Vostro-1550:/home/user_name# sudo apt-get install curl

done this successfully

root@jaskaran-Vostro-1550:/home/user_name# curl -L https://get.rvm.io | bash -s stable

done this successfully

but when I run this command

root@jaskaran-Vostro-1550:/home/user_name# source ~/.rvm/scripts/rvm

result like that

bash: /root/.rvm/scripts/rvm: No such file or directory

What's wrong in this?

I was installing RVM on a remote server today and had the same issue. It seems that the installation was not executed by default. This is what I did to solve it:

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

  # In case rvm not found
  cd ~/.rvm/archives
  tar xvzf rvm-1.26.0.tgz # or whatever RVM version you have
  cd mpapis-rvm-xxxxxxx
  ./install
  cd ..
  rm -Rf mpapis-rvm-xxxxxxxx

source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc

Try looking in /usr/local/rvm instead. You're root, it installs differently as root.

Are you sure you want to install RVM as root? It's typically a user thing.

如果您从 root 安装了 rvm,请尝试:

source /usr/local/rvm/scripts/rvm

The scripts folder is inside the zipped directory, so first we need to extract it and then run the command. Do the following things.

cd ~/.rvm/archives
tar xvzf rvm-1.26.0.tgz # or whatever RVM version you have

This will extract the folder, and in this, there will be a folder named scripts. Now run the following command.

source ~/.rvm/archives/rvm-1.26.11/scripts/rvm

And you are done.

我也遇到了同样的问题,只需将我的用户从 root 更改为另一个普通用户即可解决,我在 Windows 10 中使用 ubuntu 子系统

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM