简体   繁体   English

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

[英]Cabal install failure on existing sandbox in Windows

I have installed the Haskell-platform on Windows. 我已经在Windows上安装了Haskell平台。 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. Cabal安装在这里:注意:我正在使用Powershell执行这些命令。

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. 基本上是关于删除/替换powershells默认目录别名。 But that's for sure not the most powershell-compatible way of fixing it. 但这肯定不是修复该问题的最与Powershell兼容的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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