I'm installing RVM on a system where I don't have sudo permissions. It should work fine in theory, but when I added
[[ -s "$HOME/.rvm/scripts/rvm" ]] &&开发者_如何学Camp; source "$HOME/.rvm/scripts/rvm"
to bash_profile, it isn't doing what it's supposed to and it gives me this error
[[: Command not found.
Anyone know what might be the problem?
"[[" .. "]]" is a bash builtin. Is another shell running the script?
It looks like your .bash_profile is being executed by a shell other than bash.
Put the following at the top of your script:
#!/bin/bash
This will enforce bash
to be the interpreting shell. As mentioned in other answers, [[ ]]
is a bashism and not POSIX syntax.
RVM is not (yet) compatible with csh, only bash and zsh >= 4.3.5 are supported.
(see http://rvm.io/rvm/prerequisites/)
精彩评论