I was trying to install home brew (I am new to the command line and was following some tutorials on how to get up and running with github).
So I was following this Unofficial Update Method: Compile Bash from Source Code using Homebrew (https://security.stackexchange.com/questions/68202/how-to-patch-bash-on-osx-in-wake-of-shellshock)
This is what I typed into the Terminal:
$ xcode-select --install
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew doctor
$ brew update
$ brew install bash
$ sudo mv /bin/bash /bin/bash_old
$ sudo mv /bin/sh /bin/sh_old
$ sudo chmod a-x /bin/bash_old /bin/sh_old
And now Bash doesnt work anymore :( When I open Terminal it displays this message:
You have new mail.
login: /bin/bash: No such file or directory
[Process completed]
init=/bin/sh_old
sudo ln -s /usr/local/Cellar/bash/4.3.25/bin/bash /bin/bash
(with the correct version of the installedbash
and the correct path) else you will never find it. You moved and renamedbash
andsh
with different names (bash_old/sh_old
) you miss to create the links.