我在使用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存储库上。但是,这也会产生错误。
作为最后的努力,我尝试将远程仓库更改为“堆栈”,即
remote-repo: stackage: http://www.stackage.org/stackage/44ea140bd97cbb0f6140d331f8f7f8667a637eda
但这也没有帮助。
感谢所有帮助!
看起来这是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
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句