So you want copy-paste instructions to install GLPK on your Macbook? Here are the steps:
- Download the latest version of GLPK fromhttp://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);
The GLPK distribution tarball can be found on http://ftp.gnu.org/gnu/glpk/ [via http] and ftp://ftp.gnu.org/gnu/glpk/ [via FTP]. It can also be found on one of our FTP mirrors; please use a mirror if possible.To make sure that the GLPK distribution tarball you have downloaded is intact you need to download the corresponding .sig file and run a command like this:gpg --verify glpk-4.32.tar.gz.sig
If that command fails because you do not have the required public key, run the following command to import it:gpg --keyserver keys.gnupg.net --recv-keys 5981E818
and then re-run the previous command.
(if gpg is not installed, refer to: http://hichenwang.blogspot.com/2011/08/install-pgp-on-mac-os-x.html) - Say it’s downloaded to your “Downloads” directory, go there and execute the following commands (using the terminal)
1.cd~/Downloads2.tar-xzf glpk-4.43.tar.gz3../configure --prefix=/usr/local# see note [1]4.make5.sudomakeinstall - At this point, you should have GLPK installed. Verify it:
1.whichglpsol2./usr/local/bin/glpsol - … and try help:
1.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:
[1]: HiveLogic article on why using /usr/local is better
[2] If you want MySQL support (or something “extra”) check out the INSTALL file in the package
[1]: HiveLogic article on why using /usr/local is better
[2] If you want MySQL support (or something “extra”) check out the INSTALL file in the package