【发布时间】:2012-10-17 18:20:21
【问题描述】:
当我尝试用 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.
【问题讨论】:
-
与大多数程序一样,cabal 有一个详细选项 (
-v),如果您包含软件版本(即 GHC),它总是很有帮助 -
除非我弄错了,
ExitFailure 9表示 GHC 收到了 SIGKILL(这可以解释没有任何错误消息的原因)。你在什么样的系统上运行这个?是否有某种正在运行的监控应用程序会因为使用过多的内存或类似的东西而杀死 GHC? -
@hammar 我在 Amazon EC2 微型实例上运行 Ubuntu 服务器。我想你可能是对的。尝试安装 ghc-mod 时,它几乎使用了所有 613 MB RAM。有什么巧妙的方法可以解决这个问题吗?