GHC & Cabal APT Repository

If you have any feature requests or encounter any issues, please report them here.

Ubuntu

For Ubuntu, use the ppa:hvr/ghc PPA.

Debian

NOTE: As time of writing, only amd64 binaries are available

  1. Invoke apt edit-sources and add the line
    deb http://downloads.haskell.org/debian stretch main
    for Debian 9 (or
    deb http://downloads.haskell.org/debian jessie main
    for Debian 8)
  2. Register the GPG signing key with apt via e.g.
    apt-key adv --keyserver keyserver.ubuntu.com  --recv-keys BA3CBA3FFE22B574
    (or alternatively
    apt-key adv --keyserver hkp://keyserver.ubuntu.com:80  --recv-keys BA3CBA3FFE22B574
    in case port 11371 is blocked by your firewall)
  3. Update package index via apt update
  4. Install the desired GHC & Cabal packages, e.g.
    apt install ghc-8.2.2 cabal-install-2.2
  5. Add /opt/ghc/bin to your PATH environment variable
  6. (optional) Configure which versions the ghc and cabal symlinks in /opt/ghc/bin refer to with update-alternatives(1):
    update-alternatives --config opt-ghc
    update-alternatives --config opt-cabal
    Unless configured manually, the default symlinks point to the latest stable version in "auto mode".

Debian 9 (Stretch)

NOTE: Debian 9 includes packages named ghc and cabal-install which provide GHC 8.0.1 and Cabal 1.24.0.1 respectively (and which install to /usr/bin/).

Currently, the following packages are available for Debian 9 (Stretch):

Debian 8 (Jessie)

NOTE: Debian 8 includes packages named ghc and cabal-install which provide GHC 7.6.3 and Cabal 1.20.0.3 respectively (and which install to /usr/bin/).

Currently, the following packages are available for Debian 8 (Jessie):