我正在努力学习Plutus Pioneer课程,我在我的系统上遇到了这个错误: Ubuntu Linux Docker镜像在MacOS上运行。我在这里的镜像上安装了Haskell包:https://www.haskell.org/platform/linux.html
在我的Dockerfile文件中使用这一行:RUN apt-get install -y haskell-platform
这似乎安装了Cabal 2.4版。
当我克隆lectures: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.9 of的内存和1.7 of的空闲空间。谢谢你,我
发布于 2021-06-29 10:12:40
我通过增加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/cabalhttps://stackoverflow.com/questions/68160016
复制相似问题