Installing GLPK on a Mac

| Comments

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:

  1. homebrew
  2. 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:

  1. Download the latest version of GLPK from
  2. 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
  3. 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

  4. At this point, you should have GLPK installed. Verify it: which glpsol /usr/local/bin/glpsol

  5. … and try help: glpsol —help

Now that you are all set-up, read up this excellent introduction using GLPK: