Installing GHC under the home directory
- Install stack.
stack setup as a normal user. This will install GHC for you (under
stack ghci to start ghci. Please see the rest of the page linked above on how to use stack to create and build projects.
The old instructions: Installing GHC and Cabal under the home directory
Purging both from the system
libgmp-dev or equivalent using the system package manager.
export PATH="$HOME/.ghc/bin:$HOME/.cabal/bin:$HOME/.cabal-sandbox/bin:$PATH" to your
- 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
library-profiling: True and
documentation: True to
require-sandbox: True if you want to prevent accidental installation of packages outside a sandbox.
rm -fr ~/.ghc ~/.cabal
- Remove the
export PATH… line from your
Press h to open a hovercard with more details.