I am getting exit 1 errors from ld
when attempting to cabal install hindent
(the actual failing package is haskell-src-exts
). By using sudo alternatives --config ld
to select the gold linker, and then trying again, I was able to get a more meaningful error message: No space left on device
. Turns out cabal install
attempts to build projects in /tmp
, which, on my machine, is a ramdisk that is not very large. How can I tell it to build projects elsewhere?
As answered here, the solution is to set the TMPDIR
environment variable, like so:
mkdir $HOME/t
TMPDIR=$HOME/t
cabal install hindent