I'm trying to install the new Cabal in Windows 7. It successfully installs 1.18.02, but when I run "cabal --version" it shows 1.16. The folder C:\\Users\\me\\AppData\\Roaming\\cabal\\bin is at the front of my PATH.
When I directly run the 1.18 executable, I get a bunch of "cabal.exe does not exist" errors.
How can I configure Cabal to use version 1.18 by default?
There is a path conflict due the way haskell platform installs cabal.exe
To fix it:
Delete `C:/program files(x86)/Haskell platform/lib/extralibs/bin/cabal.exe.`
In any case, you can use search tool to find which cabal.exe to delete.
I used cabal-dev to install cabal 1.18 to a sandbox, such that C:\\cabal-dev\\cabal-dev\\bin contains the latest (1.18) cabal executable. I then set C:\\Cabal-dev\\cabal-dev\\bin as the first Variable value in the "Path" variable in "systems variables" (as opposed to the "PATH" variable in "user variables"). That worked for me, and allowed me to keep the older build of cabal intact, (in case its needed later).
It worked for me. Good luck. Here are my exact steps:
One other possible cause of this error (aside from the cabal in extralibs
problem described in another answer) is that the ld
in your path can't read the .o
files that GHC produces.
I hit this problem with GHC 7.8.1 RC1, and could see this going wrong by running cabal install
with -v3
. The 'ld' on my path was coming from Haskell Platform 2013.2.0.0.
Adding mingw\\bin
from the new GHC's directory to the path fixed the problem.
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.