为elm服务器编译aeson-pretty时出错

时间:2014-04-03 15:43:11

标签: haskell cabal elm

我正在尝试在x86_64 linux上安装elm-server,因为aeson-pretty编译错误而失败。我将非常感谢您解决此错误。谷歌搜索错误并没有多大帮助。所以,我在这里伸出援手。

Cabal干运行输出首先是我想要做的 - 它显示了哪些依赖项会改变:

$ cabal install elm-server --max-backjumps 1000 -v --dry-run
Reading available packages...
Choosing modular solver.
Resolving dependencies...
In order, the following would be installed:
aeson-0.7.0.2 (reinstall)
aeson-pretty-0.7.1 (reinstall) changes: aeson-0.7.0.1 -> 0.7.0.2,
attoparsec-0.10.4.0 added, cmdargs-0.10.3 added
pandoc-types-1.12.3.2 (reinstall)
texmath-0.6.6 (reinstall)
yaml-0.8.8.1 (reinstall)
pandoc-1.12.3.3 (reinstall) changes: old-time-1.1.0.1 added
Elm-0.12 (reinstall) changes: aeson-0.7.0.1 -> 0.7.0.2, aeson-pretty-0.7.1
added, pandoc-1.12.3.3 added
elm-server-0.11 (new package)

在实际运行期间编译aeson-pretty时出错 - 我将非常感谢如何解决此问题(我已从以下日志中删除了绝对文件系统路径以删除工作服务器的一些识别信息):

ghc/7.6.1/bin/ghc --make -no-link -fbuilding-cabal-package -O -static -outputdir dist/build/aeson-pretty/aeson-pretty-tmp -odir dist/build/aeson-pretty/aeson-pretty-tmp -hidir dist/build/aeson-pretty/aeson-pretty-tmp -stubdir dist/build/aeson-pretty/aeson-pretty-tmp -i -idist/build/aeson-pretty/aeson-pretty-tmp -icli-tool -idist/build/autogen -Idist/build/autogen -Idist/build/aeson-pretty/aeson-pretty-tmp -optP-include -optPdist/build/autogen/cabal_macros.h -hide-all-packages -package-db dist/package.conf.inplace -package-id aeson-0.7.0.2-f4ad04aa4d2e7f65b938bd54f014afc0 -package-id attoparsec-0.10.4.0-a54b3de99ba828be808aba7bf3812cbc -package-id base-4.6.0.0-26b6c2181978d0c24c3b2f1a3f0f4de0 -package-id bytestring-0.10.0.0-bd919bc93a32f3db2328df9effbade89 -package-id cmdargs-0.10.3-e485ed32e993ef88a56151ce766e3511 -package-id aeson-pretty-0.7.1-inplace -XHaskell98 cli-tool/Main.hs -Wall
<command line>: cannot satisfy -package-id aeson-0.7.0.2-f4ad04aa4d2e7f65b938bd54f014afc0:
    aeson-0.7.0.2-f4ad04aa4d2e7f65b938bd54f014afc0 is unusable due to missing or recursive dependencies:
      template-haskell-2.8.0.0-3c3595becd07418f521cf03c08f6ee4e
    (use -v for more information)
Failed to install aeson-pretty-0.7.1

ghc-pkg上运行template-haskell,我明白了:

$ ghc-pkg list template-haskell
WARNING: there are broken packages.  Run 'ghc-pkg check' for more details.
ghc/7.6.1/lib/ghc-7.6.1/package.conf.d
   template-haskell-2.8.0.0
.ghc/x86_64-linux-7.6.1/package.conf.d
   template-haskell-2.8.0.0

运行ghc-pkg检查,我得到了这个(只是为了验证它不是template-haskell已经坏了) - 因为Elm需要重新安装,因此elm-server有意义The following packages are broken, either because they have a problem listed above, or because they depend on a broken package. Elm-0.12

elm-server

因此,看起来我需要对template-haskell进行我自己的cabal包修改,以修复cabal sandbox的某些依赖关系。要做到这一点,我需要帮助找出如何根据cabal配置调试上面的错误。

如果有人想知道沙盒,我不想使用elm因为工作服务器上的磁盘配额限制。如果我可以安装elm-server和{{1}},我可以打破现有软件包。

1 个答案:

答案 0 :(得分:2)

template-haskell与您的GHC版本相关联,因此它不应该在您的用户包数据库中。取消注册template-haskell然后重新安装任何损坏的包。