Install Haskell on CentOS

When yum install haskell-platform fails

You use spin to get that shiny new VM up and running quickly. It’s CentOS 6.4.

You want Haskell on it. You google it, and see what appears to be an official declaration that you should do the obvious:

sudo yum install -y haskell-platform

Couldn’t be easier, right?

But you get an error:

No package haskell-platform available.

Apparently, you can’t just yum install the haskell-platform.

I’ve run up against this wall a hundred times in the past, but haven’t ever had the time or will to try and solve it. Instead, I’ve just spun up an ubuntu VM, where apt-get install haskell-platform works.

But it hit me today. Haskell might be available for CentOS through the EPEL repo. Duh. Why didn’t I think of this before?

Install the EPEL (and Remi) repo by following these instructions:

Now update and see if you can find any haskell or ghc stuff:

sudo yum update
sudo yum search haskell
sudo yum search ghc

Tons of stuff shows up now. You can install haskell packages until you die.

Installing then works as expected:

sudo yum install -y haskell-platform