Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noahcampbell/896921 to your computer and use it in GitHub Desktop.
Save noahcampbell/896921 to your computer and use it in GitHub Desktop.
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
export LIBEDIT_VERSION=0.3
curl -LOk http://jaist.dl.sourceforge.net/sourceforge/libedit/libedit-$LIBEDIT_VERSION.tar.gz
tar -zxf libedit-0.3.tar.gz
cd libedit
CFLAGS='-g -O2 -fPIC' ./configure --prefix=/usr
make
sudo make install
sudo ln -s /usr/lib/libedit.so /usr/lib/libedit.so.0
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 http://haskell.org/ghc/dist/$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
./configure
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 http://hackage.haskell.org/platform/2009.2.0/haskell-platform-2009.2.0.tar.gz
tar -zxf haskell-platform-2009.2.0.tar.gz 
cd haskell-platform-2009.2.0
./configure
make
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
@codeallthethingz
Copy link

Last download fails as it has moved from haskell's site. :( Does anyone have a replacement?
for http://hackage.haskell.org/platform/2009.2.0/haskell-platform-2009.2.0.tar.gz

@qloog
Copy link

qloog commented May 6, 2014

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

@Wilfred
Copy link

Wilfred commented Mar 2, 2017

I've built GHC on Centos 5 / RHEL 5, FWIW. I documented it here: http://stackoverflow.com/a/22842263/509706

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