Bad: modifier error when installing RVM

2019-08-24 02:15发布

问题:

I'm trying to run source /Users/alastair/.rvm/scripts/rvm, but keep getting:

Bad : modifier in $ (").

Where would the problem be? Happy to paste other files in if these would help.

回答1:

Are you in any case running a shell that is not Bash or ZSH? Bash >= 3.2.25 or ZSH >= 4.3.10 is required.

Your problem looks like you were using minimalistic shell sh which is not supported by RVM.

You can check user shell in /etc/passwd and change it with chsh -s /path/to/new/shell - list of allowed shells is available in /etc/shells - but make sure to pick Bash/ZSH, also note that links like sh->bash will not work as bash changes behavior based on the name that was invoked.



标签: terminal rvm