Downloads for Linux

Package-based install

Ubuntu

被窝里的公息第十三章Steps to setup ghc and cabal are given in the

Packages from the PPA can be installed as follows:

sudo add-apt-repository -y ppa:hvr/ghc
sudo apt-get update
sudo apt-get install -y cabal-install-XXX ghc-YYY

Packages are installed into /opt/ghc/bin and /opt/cabal/bin

被窝里的公息第十三章Steps to setup stack are .

Debian (jessie and stretch)

Steps to setup ghc and cabal are given in the

Steps to setup stack are .

Fedora

GHC and cabal-install are in the official Fedora repos, to install:

sudo dnf install ghc cabal-install

There are also which include more recent ghc and cabal-install.

被窝里的公息第十三章Note ghc from Copr cannot be installed in parallel with official Fedora ghc packages.

Steps to setup stack are . You can also obtain stack from the fedora

EPEL for RHEL/CentOS/etc

  • EPEL 7 has ghc-7.6.3 and cabal-install-1.16.1.0
  • EPEL 5 and 6 have ghc-7.0.4 and cabal-install-0.10.2

被窝里的公息第十三章To install these older versions of ghc and cabal-install from the official EPEL repo, just run the install command:

sudo yum install ghc cabal-install

被窝里的公息第十三章For newer versions of ghc you can use the unofficial Fedora Copr repos:

Note the ghc packages from Copr cannot be installed in parallel with EPEL ghc.

被窝里的公息第十三章Steps to setup stack are . You can also obtain stack from the fedora

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 .

openSUSE Leap

  • Leap 15.1 has ghc-8.6.4 and cabal-install-2.4.0.0

To install from official openSUSE:Leap repo, just run the install command:

sudo zypper in ghc cabal-install

For last stable version you can use the development openSUSE repository:

Use this command to add repository to your system:

sudo zypper ar -f -p 90 http://download.opensuse.org/repositories/devel:/languages:/haskell/openSUSE_Leap_15.1/devel:languages:haskell.repo

openSUSE Tumbleweed

  • Tumbleweed has last stable version of ghc and cabal install.

To install from official openSUSE:Tumbleweed repo, just run the install command:

sudo zypper in ghc cabal-install

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 .

Download GHC now →

2. Install Cabal-install

被窝里的公息第十三章After installing GHC, you will want the Haskell package manager:

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

$ sh ./bootstrap.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 1.18.0.2
using version 1.18.1.2 of the Cabal library

You can now update your package set:

$ cabal update

被窝里的公息第十三章And install proced to use cabal with your projects.

3. Installing Stack

被窝里的公息第十三章Generic stack binary downloads are available from the .