Cabal安装问题

时间:2014-06-14 13:53:01

标签: haskell cabal

我在使用cabal安装软件包时遇到了一些问题。发出以下命令:

> cabal install ghc-mod stylish-haskell haskell-docs hdevtools

产生这些错误

Building yaml-0.8.8.3...
Preprocessing library yaml-0.8.8.3...
<command line>: cannot satisfy -package-id aeson-0.7.0.6-b19228a032fb34be4eef122
913c6e81a
    (use -v for more information)
Failed to install yaml-0.8.8.3
cabal: Error: some packages failed to install:
ghc-mod-4.1.1 depends on haskell-src-exts-1.15.0.1 which failed to install.
haskell-docs-0.2.0.0 failed during the building phase. The exception was:
ExitFailure 1
haskell-src-exts-1.15.0.1 failed while unpacking the package. The exception
was:
C:\Users\Arnob\AppData\Local\Temp\haskell-src-exts-1.15.0.1-5840\haskell-src-ext
s-1.15.0.1\dist-tmp:
MoveFileEx
"C:\\Users\\Arnob\\AppData\\Local\\Temp\\haskell-src-exts-1.15.0.1-5840\\haskell
-src-exts-1.15.0.1\\dist-tmp"
"C:\\Users\\Arnob\\AppData\\Local\\Temp\\haskell-src-exts-1.15.0.1-5840\\haskell
-src-exts-1.15.0.1\\dist":
permission denied (Access is denied.)
hdevtools-0.1.0.5 depends on unix-2.7.0.1 which failed to install.
hlint-1.8.61 depends on haskell-src-exts-1.15.0.1 which failed to install.
stylish-haskell-0.5.10.0 depends on yaml-0.8.8.3 which failed to install.
unix-2.7.0.1 failed during the configure step. The exception was:
ExitFailure 1
yaml-0.8.8.3 failed during the building phase. The exception was:
ExitFailure 1

我还尝试通过运行

来安装hdevltools的windows fork
> cabal install

在克隆的github repo上。然而,这也会产生错误。

作为最后的努力,我尝试将远程仓库改为&#34; stackage&#34;,即

remote-repo: stackage: http://www.stackage.org/stackage/44ea140bd97cbb0f6140d331f8f7f8667a637eda

但这也无济于事。

感谢所有帮助!

2 个答案:

答案 0 :(得分:3)

看起来这是一个特定于Windows的问题,其中cabal无法移动haskell-src-exts分发中的某些必需文件(该问题也出现在其他软件包中,例如pandoc)。这可能与此处报告的问题有关:https://github.com/haskell/cabal/issues/1698

通过执行以下操作,我能够安装haskell-src-exts软件包:

> cabal unpack haskell-src-exts
> cd haskell-src-exts
> cabal install

答案 1 :(得分:0)

您的问题列在Cabal的错误消息中:

MoveFileEx ... ...:
permission denied (Access is denied.)

因此,您的Windows安装(或至少是您的用户临时文件夹)似乎存在权限问题,这就是Cabal绊倒的原因。