[英]cabal install ghc impossible happened: heap overflow
我正在尝试跟随 Plutus Pioneer 讲座,但出现此错误我的系统:在 MacOS 上运行的 Ubuntu Linux Docker 映像。 我从这里在图像上安装了 Haskell 包: https : //www.haskell.org/platform/linux.html
在我的 Dockerfile 中使用这一行: RUN apt-get install -y haskell-platform
这似乎安装了 Cabal 2.4 版。
当我克隆讲座的代码存储库时: https : //github.com/input-output-hk/plutus-pioneer-program然后转到 week01 目录并像讲座中一样尝试cabal build
,我找不到依赖项错误。 第一个缺少的依赖项是“aeson”,如果我运行cabal install aeson
,它似乎会安装。
随后的构建尝试因依赖项 'base' 版本错误而失败。
然后我想如果我将 Cabal 更新到 3.4 版可能会有所帮助,所以我尝试了cabal install cabal-install
,但这也有错误:
Theexception was:ExitFailure (-9)
This may be due to an out-of-memory condition.
所以我搜索了更多并尝试了这个命令行: cabal install --ghc-options="+RTS -M600M" -j1 cabal-install
from here https://stackoverflow.com/a/46148345/52236
这似乎更进一步,但现在我遇到了这个错误:
ghc: panic! (the 'impossible' happened)
(GHC version 8.6.5 for x86_64-unknown-linux): heap overflow
如果有人知道如何解决这个问题,我们将不胜感激。 我是否需要为我的 Docker Ubuntu 映像添加更多 RAM? 它目前有 1.9GB 的内存和 1.7GB 的可用空间。 谢谢,米
我通过增加 RTS 参数来解决这个问题:
cabal install --ghc-options="+RTS -M1000M" -j1 cabal-install
好吧,实际上它编译了所有内容,但是cabal --version
仍然说 2.4,而不是 3.4。 也有这个警告:
Warning: could not create a symlink in /root/.cabal/bin for cabal because the
file exists there already but is not managed by cabal. You can create a
symlink for this executable manually if you wish. The executable file has been
installed at /root/.cabal/bin/cabal
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.