Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
How to install Haskel and Cabal on CentOS 5.4 given the versions of glibc and the version of linux.

Adopted from this post

Install libedit

sudo yum install libtermcap-devel
curl -LOk$LIBEDIT_VERSION.tar.gz
tar -zxf libedit-0.3.tar.gz
cd libedit
CFLAGS='-g -O2 -fPIC' ./configure --prefix=/usr
sudo make install
sudo ln -s /usr/lib/ /usr/lib/
sudo /sbin/ldconfig
cd ~

Install GHC version 6.10.2 (has to be this version)

export GHC_VERSION=6.10.2
export GHC_ARCH=`uname -p`
curl -LOk$GHC_VERSION/ghc-$GHC_VERSION-$GHC_ARCH-unknown-linux.tar.bz2
bunzip2 ghc-6.10.2-x86_64-unknown-linux.tar.bz2
tar -xf ghc-6.10.2-x86_64-unknown-linux.tar
cd ghc-6.10.2
sudo make install
cd ~

Install Haskel Platform (again has to be this version)

sudo yum install gmp gmp-devel freeglut freeglut-devel libX11-devel mesa-libGLU-devel zlib-devel
curl -LOk
tar -zxf haskell-platform-2009.2.0.tar.gz 
cd haskell-platform-2009.2.0
sudo make install
cabal update
cabal install cabal-install  # because cabal update says so.

Install pandoc, because that's what motivated this whole exercise

cabal install --global pandoc

Last download fails as it has moved from haskell's site. :( Does anyone have a replacement?

qloog commented May 6, 2014

officel website's file source is not exist ....... , hope it's exist

Wilfred commented Mar 2, 2017

I've built GHC on Centos 5 / RHEL 5, FWIW. I documented it here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment