Affichage des articles dont le libellé est glpk. Afficher tous les articles
Affichage des articles dont le libellé est glpk. Afficher tous les articles

mercredi 3 août 2011

[FW] Installing GLPK on a Mac


So you want copy-paste instructions to install GLPK on your Macbook? Here are the steps:


  1. Download the latest version of GLPK fromhttp://www.gnu.org/software/glpk/#downloading
  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 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)
  3. Say it’s downloaded to your “Downloads” directory, go there and execute the following commands (using the terminal)
    1.cd ~/Downloads
    2.tar -xzf glpk-4.43.tar.gz
    3../configure --prefix=/usr/local # see note [1]
    4.make
    5.sudo make install
  4. At this point, you should have GLPK installed. Verify it:
    1.which glpsol
    2./usr/local/bin/glpsol
  5. … 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