Haskell on Windows - Stack undlader at hente pakkeindeks

Indlæg af Hanne Mølgaard Plasc

Problem



Jeg forsøger at installere Haskell på Windows. Downloadet installationsprogrammet og klikket bare på alt og forsøgte at bruge Stack til at installere en pakke, kørte den fra en midlertidig mappe, hvor alt har skriveadgang:


C:	>stack install hfmt
Using latest snapshot resolver: lts-8.3
Writing implicit global project config file to: C:srglobal-projectstack.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:srindicesHackagegit-updateall-cabal-hashes>@if ""--git-dir=.git""=="gui" @goto gui
Process exited with ExitFailure 255: C:Program Files (x86)Gitcmdgit.CMD --git-dir=.git fetch --tags
Failed to fetch package index, retrying.
removeDirectoryRecursive: permission denied (Access is denied.)


Hvad går der galt, og hvordan kan jeg rette det? Eller skal jeg glemme Stack og bare bruge Cabal i stedet?


Forsøg at genoprette kommandoen som administrator. Denne gang var svaret øjeblikkeligt:


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

Bedste reference