Skip to content

Instantly share code, notes, and snippets.

@rmoorman
Forked from ion1/install-ghc.md
Created November 22, 2012 10:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmoorman/4130436 to your computer and use it in GitHub Desktop.
Save rmoorman/4130436 to your computer and use it in GitHub Desktop.
Installing GHC and Cabal under the home directory

Installing GHC and Cabal under the home directory

  1. Install libgmp-dev libgmp3c2 or equivalent using the system package manager.
  2. Add export PATH="$HOME/.ghc/bin:$HOME/.cabal/bin:$PATH" to your .<shell>rc.
  3. Also run the command above now.
  4. Get the GHC binary tarball and extract it.
  5. ./configure --prefix="$HOME/.ghc" && make install
  6. Get the cabal-install source tarball and extract it.
  7. EXTRA_CONFIGURE_OPTS=-p sh bootstrap.sh
  8. cabal update
  9. Add library-profiling: True and documentation: True to ~/.cabal/config.

Purging both from the system

  1. rm -fr ~/.ghc ~/.cabal
  2. Remove the export PATH… line from your .<shell>rc.
@sfogarty
Copy link

This works for older versions of cabal (I used it for 1.22.9.0), but newer versions lack the bootstrap.sh. Luckily that was exactly what I needed for my incomplete 8.2.2 setup!

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