Saturday, May 11, 2013

How to setup Haskell Platform (haskell-platform-2012.4.0.0) on Ubuntu 13.04

As per the Haskell Platform website you need ghc 7.4.2 to use haskell-platform-2012.4.0.0.

On Ubuntu 13.04 you can't install ghc 7.4.2 using apt-get as the repository only allows you to install ghc 7.6*.

Start with installing some dependencies using apt-get:
$> sudo apt-get install libgmp3-dev freeglut3 freeglut3-dev

And download ghc 7.4.2 bundle from here.
Extract it and run:

$> cd <extracted folder of ghc 7.4.2>

$> ./configure

It will fail and the solution is discussed here.

$> sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib/

$> ./configure && make install

That should lead to successful installation of ghc 7.4.2.

Now Haskell Platform:
Download Haskell Platform from here.

Extract it and run:
$> cd <extracted folder of haskell-platform 2012.4.0.0>

$> ./configure

$> make

$> make install

All set. Now get back to hacking! :)