How to install Haskell Platform for Ubuntu 13.04? I get the following error when I type sudo apt-get install haskell-platform:

E: Unable to locate package haskell-platform error 
  • you also might find askubuntu.com/questions/288201/… useful
    – hdgarrood
    Commented Apr 30, 2013 at 0:04
  • 2
    By @HokieTux "There is a bug on Launchpad for all of this, but it isn't getting much attention. Please visit this and mark it as affecting you if you landed on this page because Ubuntu 13.04's Haskell packages are hosed:" The link is: bugs.launchpad.net/ubuntu/+source/haskell-platform/+bug/1047678 Commented Aug 16, 2013 at 17:33
  • This is fixed in 13.10, so upgrading is a solution for those who can upgrade.
    – Squidly
    Commented Oct 30, 2013 at 17:35
  • Upgrading FUBARs 13.04 (as many of my previous attempt to upgrade have failed).
    – karatedog
    Commented Nov 11, 2013 at 0:02
  • This is not fixed in 13.10. You won't be able to apt-get install ghc, which depends on GHC 4.8.1, while the one installed and used by lots of Ubuntu libraries is 4.8.2. It's damn perfect time to migrate to NixOS. Commented Jan 24, 2014 at 11:59

5 Answers 5


Raring is caught in a valley between having a GHC too new for Haskell Platform 2012.4.0.0 and too old for 2013.2.0.0. This valley can be bridged with some pain and duct tape.

You can install the Haskell Platform 2013.2.0.0 from source if you have GHC already installed. It's a bit of a process, but it does work.

First, install GHC 7.6.2:

sudo apt-get install ghc

Now you need GHC 7.6.3 as it is a pre-req for Haskell Platform 2013.2.0.0.


You might think installing from the unknown-linux archives of GHC will work. It won't. The GHC in those archives is dynamically linked against /usr/lib/libgmp.so.3 which is unavailable on Raring which has libgmp.so.10. Do NOT be tempted to symlink this library to it's earlier version's name and location to fake out the linker. I went there and it is a path to very confusing failures and is a very bad practice so I mended my ways and built GHC from source.

Next, you need to get and build GHC 7.6.3 from source (GHC is a self-hosted compiler so it needs GHC to build it):

wget http://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-src.tar.bz2
tar xjvf ghc-7.6.3-src.tar.bz2
cd ghc-7.6.3
sudo make install

Compiling GHC took quite a while (several hours, > halflife of Cesium isotope Cs-134m) for me so this is likely a very good time for a break or sleep. It goes through three stages (0, 1, and 2) of building the compiler and then building the compiler's next stage with the compiler that was built.

To speed the compile process up, you can use

make -j 8

in the above step to leverage multi-core CPU.

Then, get and build the Haskell Platform from source (I'll use 2013.2.0.0 as an example):

wget http://lambda.haskell.org/platform/download/2013.2.0.0/haskell-platform-2013.2.0.0.tar.gz
tar xzvf haskell-platform-2013.2.0.0.tar.gz
cd haskell-platform-2013.2.0.0
sudo make install

Compiling the Haskell Platform took quite >30 minutes for me so this is another good time for a break.

You should now have a working Haskell Platform 2013.2.0.0 with GHC 7.6.3 correctly linked against libgmp.so.10.

  • 4
    On ubuntu 13.04 on a fresh install, I had to install libncurses5-dev package for the install to work. =)
    – Felipe
    Commented Jul 20, 2013 at 8:24
  • 1
    I also needed: sudo apt-get install libgl1-mesa-dev libglc-dev freeglut3-dev libedit-dev libglw1-mesa libglw1-mesa-dev Commented Aug 16, 2013 at 14:12
  • can I delete these 2 folders after haskell installation? Commented Aug 31, 2013 at 10:48
  • Yes, you can delete the folders after the installation. Thank you for the comments and edits folks. Good stuff. Commented Sep 18, 2013 at 20:30
  • 3
    Just to not scare people off: building ghc-7.6.3 on my five-years-old desktop took about 2.5 hours, and on modern i7 desktop — about 20 minutes. Haskell platform is building almost instantaneously. All results are with make -j8. Commented Jan 23, 2014 at 6:11

Ubuntu 13.04 repo contains GHC 7.6.2, unfortunately there's no Haskell Platform for GHC 7.6.x yet. So you'd better to build an eariler version of GHC (i.e., 7.4.x) and Haskell Platform from source for now.

See this for more information: https://launchpad.net/ubuntu/raring/i386/haskell-platform

  • 5
    One wonders why, knowing that there's no Platform release including GHC 7.6 yet, they chose to ship GHC 7.6 and thus break Haskell development for a lot of people. Commented Apr 30, 2013 at 13:43
  • You need to discuss that with the package maintainers Commented May 22, 2013 at 11:36

As the excellent answer from Alain O'Dea above details, this problem is not easily fixed, and in the meantime there is no haskell-platform available for Ubuntu 13.04.

You can sort of 'fake' it by installing the packages on this list: http://packages.ubuntu.com/precise/haskell-platform

Here is a command to do this for you:

sudo apt-get install ghc alex cabal-install happy libghc-cgi-dev libghc-fgl-dev libghc-glut-dev libghc-haskell-src-dev libghc-html-dev libghc-http-dev libghc-hunit-dev libghc-mtl-dev libghc-network-dev libghc-opengl-dev libghc-parallel-dev libghc-parsec3-dev  libghc-quickcheck2-dev libghc-regex-base-dev libghc-regex-compat-dev  libghc-regex-posix-dev libghc-stm-dev libghc-syb-dev  libghc-text-dev  libghc-transformers-dev  libghc-xhtml-dev libghc-zlib-dev

The two items missing from this are the haskell-platform-doc and haskell-platform-prof packages, for obvious reasons.

Hopefully, the Ubuntu devs fix the incompatibility issue soon.

On that note:

In addition: I unfortunately don't have the reputation to leave this as a comment on this StackExchange site, but that is the most appropriate place.

There is a bug on Launchpad for all of this, but it isn't getting much attention. Please visit this and mark it as affecting you if you landed on this page because Ubuntu 13.04's Haskell packages are hosed:


Hopefully a mod will take this answer and make it into a comment, where it belongs. Sorry - I just don't have the reputation on askubuntu yet!

  • 1
    I'll put the launchpad bug tracker as a top comment in this thread. I think it's important that people who read this page go there and put some pressure for this being solved. Commented Aug 16, 2013 at 17:34

I've used this script.


# Install needed developer libraries
sudo apt-get install libgmp-dev zlib1g-dev libgl1-mesa-dev libglc-dev freeglut3-dev libedit-dev libglw1-mesa-dev libglw1-mesa

# Remove old tmp folder
sudo rm -r tmp
mkdir tmp

# Create symlink if necessary
if [ ! \( -e "$libgmp" \) ]
    sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so.10.0.5 $libgmp

# Download the ghc
wget $url -O $output_ghc_archive

# Unpack and remove archive
tar -xjvf $output_ghc_archive -C "tmp/"
rm $output_ghc_archive

# Configure and install
cd $output_ghc
sudo make install

# Remove ghc installation files
cd ../..
sudo rm -r $output_ghc

# Download the haskell platform
wget $url2 -O $output_hp_archive

# Unpack and remove archive
tar -xzf $output_hp_archive -C "tmp/"
rm $output_hp_archive

# Configure and install
cd $output_hp
sudo make install

# Remove haskell platform installation files
cd ../..
sudo rm -r $output_hp

# Remove this tmp folder
sudo rm -r tmp

Hope it helps.


sudo apt-get install ghc

GHC stands for Glasgow Haskell Compiler


  • 6
    GHC is not the same as the Haskell Platform, which is a collection of particular versions of particular libraries alongside a particular version of the compiler. Commented Apr 30, 2013 at 13:44
  • 2
    You give zero new information.
    – Phil
    Commented Jun 7, 2013 at 8:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .