Alberto Capitani
Alberto Capitani

Reputation: 1049

Problems with "cabal install cabal-install" in Windows

After Haskell Plaftform 2013.2.0.0 installation, the cabal.exe is in "C:\Program Files (x86)\HaskellPlatform\2013.2.0.0\lib\extralibs\"

After execution of "cabal install cabal-install" the updated cabal.exe file is in "C:\Users\Alberto\AppData\Roaming\cabal\bin"

But the old cabal.exe is still in "..\extralibs", so it is always the old version to be performed.

User variables for Alberto: PATH = C:\Users\Alberto\AppData\Roaming\cabal\bin

System variables: Path = C:\Program Files (x86)\Haskell\bin;C:\Program Files (x86)\Haskell Platform\2013.2.0.0\lib\extralibs\bin;C:\Program Files (x86)\Haskell Platform\2013.2.0.0\bin;C:\Program Files (x86)\PC Connectivity Solution\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Haskell Platform\2013.2.0.0\mingw\bin

I hastily solved this problem by deleting the cabal.exe file in "..\extralibs", but I do not think that this is the best solution.

I have found this problem even on other computers with Windows operating systems (Vista, Windows 7, Windows 8)

Upvotes: 2

Views: 1748

Answers (1)

Jason
Jason

Reputation: 504

You can specify where to install cabal with the "--bindir=" option. So if you do the following, it should find it (You may have to run it from an administrative command prompt):

cabal install --bindir="C:\Program Files (x86)\Haskell\bin" cabal-install

The Haskell\bin directory didn't exist on my install (Haskell Platform 2014.2.0.0 on Windows 8 64-bit), but the install still put it first in the path. So I assumed that is where it expected cabal to install. Doing so will make sure it is found first. You can check with where cabal. It will list all cabal's on the path, with the first one used by default.

Upvotes: 1

Related Questions