简体   繁体   中英

Ubuntu 11.10 RVM Not Found

After a successful RVM single user install, I installed some gems, then restarted PuTTY, and now when I run rvm I get

-sh: rvm: not found

I've edited "~/.bashrc", "~/.bash_profile", and "/etc/bash.bashrc" to include the following at the beginning and end of the file:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" 

The only way I can get rvm commands to work is to run ". ~/.bashrc" after logging in, and then it shows me logged in as

"\[\e]0;\u@\h: \w\a\]\u@\h:\w"

"-sh: rvm: not found" seems to indicate you're getting the bourne shell when you login instead of the bash shell. This page:

http://linuxwave.blogspot.com/2009/03/changing-default-shell-in-ubuntu.html

explains how to change your shell to bash.

It gives two different methods. Here's the first one:

1) edit /etc/passwd using any editor eg
sudo vi /etc/passwd

2) find the line that belongs to the user (foo) that you want to modify eg
foo:x:1001:1001::/home/foo:/bin/sh

3) change from /bin/sh to /bin/bash eg
foo:x:1001:1001::/home/foo:/bin/bash

3) save

4) Logout and log back in

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