问题
I'm running on a container with 768MB ram and 512 MB swap space. I can't increase either of this. cabal install criterion always gives
Failed during the building phase.
The exception was: ExitFailure (-9)
This may be due to an out-of-memory condition.
during Compiling Criterion.Types. Is there any way around this or do I have to make do without criterion?
回答1:
Set RTS flags on GHC to limit its memory usage (--ghc-options="+RTS -M600M") and avoid running multiple jobs in parallel (-j1).
来源:https://stackoverflow.com/questions/46147137/cabal-install-criterion-out-of-memory