1

我正在尝试安装elm-server在由于aeson-pretty编译错误而失败的 x86_64 linux 机器上。我将不胜感激修复此错误的帮助。谷歌搜索错误并没有太大帮助。所以,我在这里伸出援手。

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-pkgtemplate-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

所以,看起来我需要对 cabal 包进行自己的修改,elm-server以修复对template-haskell. 为此,我需要帮助弄清楚如何根据 cabal 配置调试上述错误。

如果有人想知道沙盒,我不想使用cabal sandbox,因为工作服务器上的磁盘配额限制。elm如果可以获取并elm-server安装,我可以破坏现有的软件包。

4

1 回答 1

2

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

于 2014-04-03T17:44:36.680 回答