简体   繁体   中英

Errors with cabal 1.18.1.3 in Windows with latest Haskell Platform (2014.2.0.0)

I can't use cabal with the latest Haskell Platform (2014.2.0.0). I've tried uninstalling, removing all folders from PATH and deleting cabal's library directory, and still no luck

When I run cabal from the command line in the GitBash MINGW32 shell I get the following error:

cabal.exe init
cabal.exe: The program ghc version    =6.4 is required but it could not be
found.

( cabal configure , cabal install , etc. all give the same error, except cabal --version )

Now, when I execute cabal from the windows cmd, it runs fine, but when I try to do a cabal init , I get the following:

>cabal init
Package name? [default: toyrsa]
Package version? [default: 0.1.0.0]
Please choose a license:
* 1) (none)
  2) GPL-2
  3) GPL-3
  4) LGPL-2.1
  5) LGPL-3
  6) AGPL-3
  7) BSD3
  8) MIT
  9) Apache-2.0
 10) PublicDomain
 11) AllRightsReserved
 12) Other (specify)
Your choice? [default: (none)] 3
cabal: git: does not exist

Choosing the default or other options produces the same result. Upgrading to Cabal 1.20 does not help either.

This bug was documented here: https://github.com/haskell/cabal/issues/1613 and that issue claims that it was fixed in the 1.20 series. If you're using 1.20 and still running into it (and sure you're running 1.20 and not an older binary on your path) then you definitely should report it there and reopen the ticket.

Running cabal init from the cmd can be made to work by adding git to the PATH variable. The error at step 3 disappears then. Still seems pretty weird that I need git to create a configuration file for an empty local project with no dependencies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM