GLPK/Obtaining GLPK

From Wikibooks, open books for an open world
Jump to navigation Jump to search

This page explains how to download, verify, and unpack the latest GLPK distribution. This will give you access to the GLPK documentation and source code, but not to binaries — the mainline project does not provide precompiled files. Download and unpack instructions are also provided in appendix A of doc/glpk.pdf from the official GLPK documentation.

GLPK is distributed as a tarball — this is a collection of files and directories that are packed using tar and then, in this case, compressed with gzip.

The generic 0.00 version string (used below) should be replaced with the actual version string.

Download instructions[edit | edit source]

Experience shows it may take a day or so for new releases to propagate to all GNU FTP mirror sites. Check the main GNU FTP site if you don't find the latest release on a mirror site.

Web browser[edit | edit source]

Open your web browser and proceed as follows:

  • find a suitable GNU FTP mirror
  • navigate to the glpk directory
  • download the latest glpk-0.00.tar.gz tarball to your machine.

And optionally, if you wish to verify the integrity of this tarball using gpg or similar:

  • download the associated glpk-0.00.tar.gz.sig OpenPGP signature file to your machine.

wget utility[edit | edit source]

These instructions are for Linux. Other systems may also offer the wget command-line utility.

Download the latest GLPK tarball to a directory within your user space. The base URL indicated can be changed for nearby mirror, if you wish:

$ mkdir ~/glpk
$ cd ~/glpk
$ wget ftp://ftp.gnu.org/gnu/glpk/glpk-0.00.tar.gz
$ wget ftp://ftp.gnu.org/gnu/glpk/glpk-0.00.tar.gz.sig

Verify the tarball (optional)[edit | edit source]

Performing integrity checks on the downloaded tarball is optional, but nonetheless recommended. You should also try to obtain your GLPK tarball directly from a GNU mirror site and not through some other route.

Windows[edit | edit source]

Open source software Gpg4win (GNU Privacy Guard for Windows) can be used to check the integrity of the tarball.

First, check for gpg:

> "C:\Program Files\GNU\GnuPG\gpg.exe" --version
gpg (GnuPG) 1.4.11
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, CAMELLIA128,
        CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

Then verify the tarball:

$ "C:\Program Files\GNU\GnuPG\gpg.exe" --verify glpk-0.00.tar.gz.sig
gpg: Signature made 00/00/00 00:00:00 using DSA key ID 5981E818
gpg: Good signature from "Andrew Makhorin <mao@mai2.rcnet.ru>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: A2B5 6CCB 4222 0C06 4813  35BA D17B F230 5981 E818

If that fails, import the missing public key (you will need an internet connection):

> "C:\Program Files\GNU\GnuPG\gpg.exe" --keyserver keys.gnupg.net --recv-keys 5981E818
gpg: requesting key 5981E818 from hkp server keys.gnupg.net
gpg: key 5981E818: public key "Andrew Makhorin <mao@mai2.rcnet.ru>" imported
gpg: Total number processed: 1
gpg:               imported: 1

And then repeat the previous step.

Linux[edit | edit source]

If you also downloaded the associated OpenPGP signature file and have the gpg privacy utility installed, then you can check the integrity of the tarball.

First, check for gpg:

$ gpg --version
gpg (GnuPG) 1.4.18

Then verify the tarball:

$ gpg --keyid-format long --verify glpk-0.00.tar.gz.sig
gpg: Signature made Day Mon  0 00:00:00 0000 CESTT
gpg:                using DSA key D17BF2305981E818
gpg: Good signature from "Andrew Makhorin <mao@mai2.rcnet.ru>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: A2B5 6CCB 4222 0C06 4813  35BA D17B F230 5981 E818

If that fails, import the missing public key (you will need an internet connection):

$ gpg --keyserver keys.gnupg.net --keyid-format long --recv-keys D17BF2305981E818
gpg: /home/user/.gnupg/trustdb.gpg: trustdb created
gpg: key D17BF2305981E818: public key "Andrew Makhorin <mao@mai2.rcnet.ru>" imported

And then repeat the previous step.

Unpack the tarball[edit | edit source]

Windows[edit | edit source]

To unpack the tarball you need a decompression program. The open source software 7-Zip can be used for this purpose.

Linux[edit | edit source]

It may be convenient to create a dedicated subdirectory within your user space and move the GLPK tarball to there. From the command-line:

$ mkdir ~/glpk
$ mv glpk-0.00.tar.gz ~/glpk
$ cd ~/glpk

In any case, unpack the tarball. You will need a tar + gzip compatible decompression utility. From the command-line:

$ tar -xzvf glpk-0.00.tar.gz
$ cd glpk-0.00

The official GLPK documentation is in subdirectory doc.

What next[edit | edit source]

Instructions for building and installing GLPK are given elsewhere:

Old versions[edit | edit source]

The download mirrors usually contain the last ten or so releases. If looking for seriously old versions of GLPK, try: