gpt4 book ai didi

haskell - 尝试使用 Cabal 安装 ghc-mod 时出现 ExitFailure 9

转载 作者:行者123 更新时间:2023-12-03 10:37:03 26 4
gpt4 key购买 nike

当我尝试用 cabal 安装它时,我得到了

~$ cabal install ghc-mod
Resolving dependencies...
[1 of 1] Compiling Main ( /tmp/haskell-src-exts-1.13.5-21238/haskell-src-exts-1.13.5/Setup.hs, /tmp/haskell-src-exts-1.13.5-21238/haskell-src-exts-1.13.5/dist/setup/Main.o )

/tmp/haskell-src-exts-1.13.5-21238/haskell-src-exts-1.13.5/Setup.hs:1:1:
Warning: In the use of `runTests'
(imported from Distribution.Simple, but defined in Distribution.Simple.UserHooks):
Deprecated: "Please use the new testing interface instead!"
Linking /tmp/haskell-src-exts-1.13.5-21238/haskell-src-exts-1.13.5/dist/setup/setup ...
Configuring haskell-src-exts-1.13.5...
Building haskell-src-exts-1.13.5...
Preprocessing library haskell-src-exts-1.13.5...

dist/build/Language/Haskell/Exts/InternalParser.hs:1:12:
Warning: -fglasgow-exts is deprecated: Use individual extensions instead
[ 1 of 22] Compiling Language.Haskell.Exts.Annotated.Syntax ( src/Language/Haskell/Exts/Annotated/Syntax.hs, dist/build/Language/Haskell/Exts/Annotated/Syntax.o )
cabal: Error: some packages failed to install:
ghc-mod-1.11.1 depends on haskell-src-exts-1.13.5 which failed to install.
haskell-src-exts-1.13.5 failed during the building phase. The exception was:
ExitFailure 9
hlint-1.8.33 depends on haskell-src-exts-1.13.5 which failed to install.

我真的不知道从这里去哪里。我怎样才能找到更多关于它失败的原因?

编辑:我正在使用 GHC 版本 7.4.1 和 Cabal 版本 1.14.0

在详细模式下运行 Cabal 似乎没有给出任何提示,除了:
...

World file is already up to date.
cabal: Error: some packages failed to install:
ghc-mod-1.11.1 depends on haskell-src-exts-1.13.5 which failed to install.
haskell-src-exts-1.13.5 failed during the building phase. The exception was:
ExitFailure 9
hlint-1.8.33 depends on haskell-src-exts-1.13.5 which failed to install.

最佳答案

事实证明这是一个内存不足的问题,正如 hammar 所怀疑的那样。通过向系统添加一个 1GB 交换文件,我能够安装它(尽管它非常缓慢):

dd if=/dev/zero of=/swapfile bs=1M count=1024
mkswap /swapfile
swapon /swapfile

显然 EC2 实例默认没有交换。

关于haskell - 尝试使用 Cabal 安装 ghc-mod 时出现 ExitFailure 9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13104630/

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