Installing GLPK on a Mac
Obsolation note:
Thanks to Dave Coleman’s comment I found out that glpk is available through homebrew now! So you just need these 2 steps to get glpk now:
- homebrew
brew install glpk
If you still want to read on, the old way is still here…
So you want copy-paste instructions to install GLPK on your Macbook? Here are the steps:
- Download the latest version of GLPK from http://www.gnu.org/software/glpk/#downloading
- Optional: Follow the instructions to verify the download (you might need to get GNU Privacy Guard or gpg for this. You can get it at http://gnupg.org)
Say it’s downloaded to your “Downloads” directory, go there and execute the following commands (using the terminal) cd ~/Downloads tar -xzf glpk-4.43.tar.gz ./configure —prefix=/usr/local # see note 1 make sudo make install
At this point, you should have GLPK installed. Verify it: which glpsol /usr/local/bin/glpsol
… and try help: glpsol —help
Now that you are all set-up, read up this excellent introduction using GLPK: http://www.ibm.com/developerworks/linux/library/l-glpk1
Notes:
- HiveLogic article on why using /usr/local is better
- If you want MySQL support (or something “extra”) check out the INSTALL file in the package