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 on 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.
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.