Can't install RVM on Mac OS X Lion
I'm on Mac OS X Lion and I can't install RVM. I followed the installation guide on the RVM website and tried in both zsh and bash and got the same problem, on the very first step:
$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
Successfully checked out branch ''
Current branch master is up to date.
Successfully pulled (rebased) from origin
bash: ./scripts/install: /bin/bash^M: bad interpreter: No such file or directory
However if I go into directory /bin
, the program bash
is there.
Anyone have any idea what's going o开发者_高级运维n here?
You must configure git.
git config --global core.autocrlf input
git config --global core.safecrlf true
Then rm -rf ~/.rvm
and try to install rvm again.
The problem in this case is, that there is a CR+LF newline at the end of the end of the shebang. Because you are running a Unix system, only the LF is interpreted as the newline and the CR-symbol is added to the interpreter, which results in bash searching for a file with the name /bin/bash<CR>
where <CR>
is a single carriage return symbol.
The fix suggested by avy should do the trick.
精彩评论