How Do I Install Bash >= 3.2.25 on Mac Os X 10.5.8?
I'm Following Michael Hartl's Rails Tutorial, So Far I've Installed Git 1.7.5.4 X86_64 (I'm Running Osx 10.5.8) and I'm Trying to Install Rvm After I Run the...
I'm following Michael Hartl's Rails tutorial, so far I've installed Git 1.7.5.4 x86_64 (I'm running OSX 10.5.8) and I'm trying to install rvm
After I run the following:
$ curl -kL get.rvm.io | bash -s stable
I get:
BASH 3.2.25 required (you have 3.2.17(1)-release)
I've tried changing the shell, using chsh -s /opt/local/bin/bash but I get shell '/opt/local/bin/bash' does not exist
Not sure where to go from here but I'd appreciate any guidance. Thanks!
5 Answers
Homebrew is generally a bit nicer than MacPorts, as it doesn't require lots of sudo action. Here's an article that guided me to upgrading my install of bash:
As for steps:
- Install Homebrew from the docs on their homepage
Install Git using Homebrew (optional, but nice to have a more up-to-date
git)brew install gitNow install
bash:brew install bashAdd this install of
bashto the allowed shells list:echo '/usr/local/bin/bash' | sudo tee -a /etc/shells;- Homebrew installs things to
/usr/local/Cellar/by default, then symlinks any binaries to/usr/local/bin, so you've now got the latestbashsitting at/usr/local/bin/bash
- Homebrew installs things to
Finally, change your shell to use this new one:
chsh -s /usr/local/bin/bashOpen a new terminal window/tab, and run these commands to double-check your work:
$ echo $SHELL /usr/local/bin/bash $ echo $BASH_VERSION 4.2.37(2)-release
mpapis' instructions are great, but didn't completely cover all the issues when I tried them, so this is what I had to do. Every time I install RVM on a legacy system it's a real trial. The below is far from perfect and it took almost an hour, but it got me Ruby 1.9.3 on 10.5.8.
Must Read
The big picture (stuff that isn't always explained):
- RVM is designed to run under your user account, NOT as root with
sudo, so these commands are to be entered withoutsudo, just as shown. - Heeding mpapis' warning, I found that Ruby-1.9.3-p448 will work with gcc version 4.0.1 which comes with 10.5.8, but other Rubies may not.
- Some libraries Ruby requires initiate an install of MacPorts, e.g. if done like this:
rvm pkg install zlib, butpkghas been deprecated, so enterrvm help autolibsto read more… - …you may prefer something else to MacPorts, but after letting
rvm pkg install zlibdo its thing I gave in and later, my RVM install of Ruby used it nicely. - Installing Ruby may take a very long time and appear to be doing nothing (you might see
Installing required packages: autoconf, automake, [etc.] gdbm, ncurses........followed by even more very slowly-appearing lines of..........), but it will finish. - During these processor-intensive installs your computer's fan will probably spin up to maximum speed for some time :-)