Rock the Command Line: Install packages on OS X
Today I had a need to install a new version of python on a Mac via ssh. Just like using graphical installers on OS X, installing from the command line is remarkably easy. (I think it’s even easier. I’ll be rocking the command line even more now!) You’ll typically pull down a dmg with the software you want to install. In this case, I downloaded Python 2.6.4 using curl:
curl -o python2.6.4.dmg \
http://www.python.org/ftp/python/2.6.4/python-2.6.4_macosx10.3.dmg
Now, I can mount the disk image:
hdid python2.6.4.dmg
hdid can also mount disk images over http if you want to combine those two steps:
hdid http://www.python.org/ftp/python/2.6.4/python-2.6.4_macosx10.3.dmg
With the disk image mounted, you can now rock the install using installer:
sudo installer -pkg /Volumes/Python\ 2.6.4/Python.mpkg -target /
Check out the installer man page for more information.
Rock the command line!






Comments