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
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:
Now you need GHC 7.6.3 as it is a pre-req for Haskell Platform 2013.2.0.0.
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):
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
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):
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.
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
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:
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!
I've used this script.
Hope it helps.
GHC stands for Glasgow Haskell Compiler