Windows上的Haskell - Stack无法获取包索引

时间:2017-03-02 18:03:49

标签: windows haskell haskell-stack

我正在尝试在Windows上安装Haskell。下载安装程序,只需单击所有内容,然后尝试使用Stack安装软件包,从一个临时文件夹运行它,其中所有文件都具有写访问权限:

C:\t>stack install hfmt
Using latest snapshot resolver: lts-8.3
Writing implicit global project config file to: C:\sr\global-project\stack.yaml
Note: You can change the snapshot via the resolver field there.
Downloaded lts-8.3 build plan.
Fetching package index ...=.git""=="gui" was unexpected at this time.
C:\sr\indices\Hackage\git-update\all-cabal-hashes>@if ""--git-dir=.git""=="gui" @goto gui
Process exited with ExitFailure 255: C:\Program Files (x86)\Git\cmd\git.CMD --git-dir=.git fetch --tags
Failed to fetch package index, retrying.
removeDirectoryRecursive: permission denied (Access is denied.)

出了什么问题,我该如何解决?或者我应该忘记Stack而只是使用Cabal?

尝试以管理员身份重新运行该命令。这次回复是即时的:

C:\t>stack install hfmt
Fetching package index ...=.git""=="gui" was unexpected at this time.
C:\sr\indices\Hackage\git-update\all-cabal-hashes>@if ""--git-dir=.git""=="gui" @goto gui
Process exited with ExitFailure 255: C:\Program Files (x86)\Git\cmd\git.CMD --git-dir=.git fetch --tags
Failed to fetch package index, retrying.
removeDirectoryRecursive: permission denied (Access is denied.)

0 个答案:

没有答案