Downloads for Linux

Package-based install


Steps to setup ghc and cabal:

sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:hvr/ghc
sudo apt-get update
sudo apt-get install -y cabal-install-1.22 ghc-7.10.3
cat >> ~/.bashrc <<EOF
export PATH="\$HOME/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:\$PATH"
export PATH=~/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:$PATH

Steps to setup stack are on the stack website.

Debian (jessie)

Steps to setup ghc and cabal:

echo 'deb jessie-backports main' | sudo tee /etc/apt/sources.list.d/backports.list
sudo apt-get update && apt-get -t jessie-backports install ghc cabal-install
cabal update && echo export PATH='$HOME/.cabal/bin:$PATH' >> $HOME/.bashrc

Steps to setup stack are on the stack website.

Fedora 22

GHC 7.8.4 is in the official Fedora repo.

sudo dnf install ghc
sudo dnf install cabal-install

Steps to setup stack are on the stack website.

Fedora 21

To install GHC 7.8.4 from the unofficial repo:

sudo yum-config-manager --add-repo
sudo yum install ghc cabal-install

As stated in petersen/ghc-7.8.4 copr page this ghc cannot be installed in parallel with Fedora/EPEL ghc.

If you want to install from the official repo that uses an older version of ghc (7.6.x) and cabal-install (1.16.x), just run the install command without badding the unofficial repo.

Steps to setup stack are on the stack website.

Arch Linux

The official repos on Arch Linux contain packages ghc, cabal-install, happy, alex, haddock. Install them with:

sudo pacman -S ghc cabal-install happy alex haddock

Steps to setup stack are on the stack website.

Generic Tarballs

Generic minimal installers that work on most modern linux distributions are available via the Haskell Platform

Manual install

To install GHC and Cabal manually, follow these steps.

1. Install GHC

GHC has its own web site with license information, FAQ, download links and changelogs. Depending on your operating system, there should be a package made for its package manager, otherwise (e.g. Windows) it will be an installer.

You can also download the .tar.gz/.zip and unpack and install the executables and so forth manually.

Or you can even install from source, for which there is documentation.

Download GHC now →

2. Install Cabal-install

After installing GHC, you will want the Haskell package manager:

Get the Cabal archive →

Download the tar.gz file, extract and inside the resulting directory, run:

$ sh ./

This will automatically download and install all the packages necessary to setup Cabal install.

Once complete, you should add $HOME/.cabal/bin to your PATH. A simple way to do this is to edit your ~/.bashrc and place in there:

export PATH=$HOME/.cabal/bin:$PATH

Now you should be able to run cabal:

$ cabal --version
cabal-install version
using version of the Cabal library

You can now update your package set:

$ cabal update

And install packages into a sandbox so it doesn't conflict with other projects:

$ mkdir my-project
$ cd my-project
$ cabal sandbox init
$ cabal install the-package-name

3. Installing Stack

Generic stack binary downloads are available from the stack website.