public
Last active

Installing GHC and Cabal under the home directory

  • Download Gist
install-ghc-cabal.md
Markdown

Installing GHC and Cabal under the home directory

  1. Install libgmp-dev or equivalent using the system package manager.
  2. Add export PATH="$HOME/.ghc/bin:$HOME/.cabal/bin:$HOME/.cabal-sandbox/bin:$PATH" to your .profile/.zprofile.
  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 .*profile.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.