Cabal在Windows中的现有沙箱上安装失败

时间:2014-03-21 17:22:32

标签: windows haskell cabal cabal-install

我在Windows上安装了Haskell平台。我正在尝试从现有的cabal沙箱构建现有项目。每当我尝试重新安装时,所有软件包都会失败并显示以下错误:

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

想知道我需要指定一个绝对的指示牌。 Cabal安装在这里: 注意:我正在使用Powershell来执行这些命令。

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

这里是完整的输出。

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

如何为前缀?

指定绝对目录名称

1 个答案:

答案 0 :(得分:1)

您可以尝试使用here所述的解决方案。它基本上是关于删除/替换powershells默认目录别名。但这肯定不是与PowerShell最兼容的解决方法。