Haskell - 使用堆栈安装错误

时间:2017-09-14 13:42:22

标签: haskell haskell-stack

如果我尝试运行stack install lens,我会

lens-4.15.1: configure

--  While building package lens-4.15.1 using:
      /home/marcosh/.stack/programs/x86_64-linux/ghc-8.0.2/bin/ghc --make -odir /tmp/stack11968/lens-4.15.1/.stack-work/dist/x86_64-linux/Cabal-2.0.0.2/setup -hidir /tmp/stack11968/lens-4.15.1/.stack-work/dist/x86_64-linux/Cabal-2.0.0.2/setup -i -i. -package=Cabal-2.0.0.2 -clear-package-db -global-package-db -package-db=/home/marcosh/.stack/snapshots/x86_64-linux/lts-8.23/8.0.2/pkgdb /tmp/stack11968/lens-4.15.1/Setup.lhs /home/marcosh/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -main-is StackSetupShim.mainOverride -o /tmp/stack11968/lens-4.15.1/.stack-work/dist/x86_64-linux/Cabal-2.0.0.2/setup/setup -threaded
    Process exited with code: ExitFailure 1
    Logs have been written to: /home/marcosh/.stack/global-project/.stack-work/logs/lens-4.15.1.log

    [1 of 2] Compiling Main             ( /tmp/stack11968/lens-4.15.1/Setup.lhs, /tmp/stack11968/lens-4.15.1/.stack-work/dist/x86_64-linux/Cabal-2.0.0.2/setup/Main.o )

    /tmp/stack11968/lens-4.15.1/Setup.lhs:7:31: error:
        Module
        ‘Distribution.Package’
        does not export
        ‘PackageName(PackageName)’

我使用的是stack

的以下版本
Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1

8.0.2的版本GHC

我也做了stack update

您对如何解决问题有任何建议吗?

---编辑---

我的全局stack.yaml文件看起来像

flags: {}
extra-package-dbs: []
packages: []
extra-deps: []
resolver: lts-8.23

我尝试将解析器更新为lts-9.4,但我仍然遇到(其他)错误

---编辑2 ---

stack exec ghc-pkg list Cabal的输出是

/home/marcosh/.stack/programs/x86_64-linux/ghc-8.0.2/lib/ghc-8.0.2/package.conf.d
    Cabal-1.24.2.0
    Cabal-2.0.0.2
/home/marcosh/.stack/snapshots/x86_64-linux/lts-8.23/8.0.2/pkgdb
    (no packages)
/home/marcosh/.stack/global-project/.stack-work/install/x86_64-linux/lts-8.23/8.0.2/pkgdb
    (no packages)

0 个答案:

没有答案