- Install
libgmp-dev libgmp3c2
or equivalent using the system package manager. - Add
export PATH="$HOME/.ghc/bin:$HOME/.cabal/bin:$PATH"
to your.<shell>rc
. - Also run the command above now.
- Get the GHC binary tarball and extract it.
./configure --prefix="$HOME/.ghc" && make install
- Get the cabal-install source tarball and extract it.
EXTRA_CONFIGURE_OPTS=-p sh bootstrap.sh
cabal update
- Add
library-profiling: True
anddocumentation: True
to~/.cabal/config
.
rm -fr ~/.ghc ~/.cabal
- Remove the
export PATH…
line from your.<shell>rc
.
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!