问题描述
我正在尝试运行 source/Users/alastair/.rvm/scripts/rvm
,但继续:
I'm trying to run source /Users/alastair/.rvm/scripts/rvm
, but keep getting:
Bad : $ (") 中的修饰符.
问题出在哪里?如果有帮助,很乐意粘贴其他文件.
Where would the problem be? Happy to paste other files in if these would help.
推荐答案
在任何情况下,您是否都在运行不是 Bash 或 ZSH 的 shell?Bash >= 3.2.25
或 ZSH >= 4.3.10
是必需的.
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.
您的问题看起来像您使用的是 RVM 不支持的简约 shell sh
.
Your problem looks like you were using minimalistic shell sh
which is not supported by RVM.
您可以在 /etc/passwd
中检查用户 shell 并使用 chsh -s/path/to/new/shell
更改它 - 允许的 shell 列表可在/etc/shells
- 但一定要选择 Bash/ZSH,还要注意像 sh->bash 这样的链接将不起作用,因为 bash 根据调用的名称改变行为.
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.
这篇关于错误:安装 RVM 时出现修改器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!