Gitit on Ubuntu

Installing gitit on Ubuntu Intrepid Ibex

Gitit requires ghc 6.10, and Ubuntu’s package manager has 6.8. So, here’s a procedure for installing gitit on Ubuntu. This puts everything in $HOME and does not mess with /usr at all.

  1. First, make sure zlib, pcre, git, and wget are installed:

    sudo apt-get install zlib1g-dev libpcre3-dev git-core wget
    
  2. Get ghc 6.10 (binary package):

    wget http://www.haskell.org/ghc/dist/6.10.1/ghc-6.10.1-i386-unknown-linux-libedit2.tar.bz2
    tar xvjf ghc-6.10.1-i386-unknown-linux-libedit2.tar.bz2
    cd ghc-6.10.1-i386-unknown-linux-libedit2
    ./configure --prefix=~/ghc-6.10
    make install
    

    This will install ghc 6.10 in ~/ghc-6.10.

  3. Add ~/ghc-6.10/bin to your system path (ahead of /usr/bin). Verify that you’re on 6.10 with

    ghc --version
    
  4. Get cabal-install and install it with the bootstrap script:

    wget http://hackage.haskell.org/packages/archive/cabal-install/0.6.2/cabal-install-0.6.2.tar.gz
    tar zxvf cabal-install-0.6.2.tar.gz
    cd cabal-install-0.6.2
    ./bootstrap.sh
    
  5. Make sure ~/.cabal/bin is in your system path. Now you should be able to

    cabal update
    cabal install -fhighlighting pandoc gitit
    

This procedure installs the latest released version of gitit. If you want to play with the development version, replace step 5 with:

git clone git://github.com/jgm/gitit.git
cd gitit
cabal install -fhighlighting -fplugins

Or, if you don’t want plugins support, which significantly increases the size of the gitit executable, use -f-plugins.