2

So, I followed this tutorial...

It seems that it worked fine. When I type in

echo $SHELL and echo $BASH_VERSION

I get

"/usr/local/bin/bash" and "4.0.0(1)-release" .

But, when I simply run "bash" I get shells command line with "bash-3.2$" (not sure if this is important?) and when I try to install RVM (which is my main reason for doing the upgrade in the first place) I still get the

BASH 3.2.25 required (you have 3.2.17(1)-release)

error.

1
  • Your installation of OS X is quite old, isn't it? On 10.6.8, /bin/bash has the version 3.2.48(1)-release. Anyway, the tutorial you linked to was written 3 years ago, and the latest release of Bash is 4.2.37. You may want to install that. Oct 8, 2012 at 15:21

1 Answer 1

1

This is because /bin/bash takes precedence over /usr/local/bin/bash in your $PATH. Thus, when you simply write bash, it'll load the former instead of the more recent version.

To fix this, you will need to edit your ~/.bash_profile and add:

export PATH=/usr/local/bin:$PATH

Save the file, and reload your shell (e.g. by exiting the Terminal). Now, any call to bash should use the version in /usr/local/bin instead.

2
  • Here is a documentation about the PATH variable, at the end OS X is discussed. You can also edit /etc/paths (provided you have administrator rights) and put the line /usr/local/bin above the line /bin so that the binaries in /usr/local/bin have precedence. Oct 8, 2012 at 13:13
  • That's true, but I'd personally rather not change system files for these kinds of per-user tasks.
    – slhck
    Oct 8, 2012 at 13:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .