gpt4 book ai didi

haskell - 使用 cabal 更新 agda 时出现内存不足情况错误?

转载 作者:行者123 更新时间:2023-12-04 01:24:57 24 4
gpt4 key购买 nike

我正在尝试升级 agda,出现内存错误。有什么办法可以解决这个问题?

我尝试了 cabal install --ghc-options="+RTS -M600M"--force-reinstalls agda 但是根据类似的问题,这只是给出了一个堆错误。

wmacmil@w:~$ cabal install --force-reinstalls agda
Resolving dependencies...
Warning: The following packages are likely to be broken by the reinstalls:
Agda-2.6.0.1
Continuing even though the plan contains dangerous reinstalls.
Downloading base-compat-0.10.5...

...

[325 of 369] Compiling Agda.TypeChecking.IApplyConfluence ( src/full/Agda/TypeChecking/IApplyConfluence.hs, dist/build/Agda/TypeChecking/IApplyConfluence.o )
[326 of 369] Compiling Agda.TypeChecking.Rules.LHS.Unify ( src/full/Agda/TypeChecking/Rules/LHS/Unify.hs, dist/build/Agda/TypeChecking/Rules/LHS/Unify.o )
cabal: Leaving directory '/tmp/cabal-tmp-30263/Agda-2.6.1'
cabal: Error: some packages failed to install:
Agda-2.6.1 failed during the building phase. The exception was:
ExitFailure (-9)
This may be due to an out-of-memory condition.

最佳答案

啊,GHC 的内存饥饿是无法饱和的...

对于更大的安装,我通常做的是,几乎不限制 GHC 的 -M(或者可能是总内存的 80%),但要确保它实际上具有每个进程的所有可用空间,通过将编译限制为单个进程。

cabal install --ghc-options="+RTS -M7G" -j1 --force-reinstalls agda

显然,这会使一切变得非常缓慢,但至少它通常会成功。

关于haskell - 使用 cabal 更新 agda 时出现内存不足情况错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62089409/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com