简体   繁体   中英

Cabal install failure on existing sandbox in Windows

I have installed the Haskell-platform on Windows. I am trying to build an existing project from an existing cabal sandbox. Whenever I attempt to reinstall, all packages fail with the following error:

cabal.exe: expected an absolute directory name for --prefix:

Was wondering where I need to specify an absolute directoy. Cabal is installed here: Note: I am using Powershell to execute these commands.

C:\Users\user\AppData\Roaming\cabal\bin\cabal.exe

Here's the full output.

websockets-snap-0.8.2.1 (new package)
Project-0.1 (new package)
cabal.exe: The following packages are likely to be broken by the reinstalls:
haskell-platform-2013.2.0.0
cgi-3001.1.7.5
Use --force-reinstalls if you want to install anyway.
PS C:\Users\user\Project> cabal install --force-reinstalls
Resolving dependencies...
Warning: The following packages are likely to be broken by the reinstalls:
haskell-platform-2013.2.0.0
cgi-3001.1.7.5
Continuing even though the plan contains dangerous reinstalls.
Configuring Crypto-4.2.5.1...
cabal.exe: expected an absolute directory name for --prefix:
/Users/user/Project/.cabal-sandbox
Failed to install Crypto-4.2.5.1
Configuring MonadRandom-0.1.13...
cabal.exe: expected an absolute directory name for --prefix:
/Users/user/Project/.cabal-sandbox
Failed to install MonadRandom-0.1.13
Configuring SHA-1.6.1...
cabal.exe: expected an absolute directory name for --prefix:
/Users/user/Project/.cabal-sandbox
Failed to install SHA-1.6.1

How do I specify an absolute directory name for prefix?

You could try using the solution described here . It's basically about removing/replacing powershells default dir alias. But that's for sure not the most powershell-compatible way of fixing it.

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