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.

JoshP
  • 2,272
  • 3
  • 22
  • 28
Relja
  • 123
  • 3
  • 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](ftp://ftp.cwru.edu/pub/bash/bash-4.2.tar.gz). You may want to install that. – Percival Ulysses Oct 08 '12 at 15:21

1 Answers1

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.

slhck
  • 223,558
  • 70
  • 607
  • 592
  • Here is a [documentation](http://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them/284351#284351) 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. – Percival Ulysses Oct 08 '12 at 13:13
  • That's true, but I'd personally rather not change system files for these kinds of per-user tasks. – slhck Oct 08 '12 at 13:42