[英]Network-2.4.2.2 error cabal install on Windows
When attempting to install the network package (cabal install network) on Windows Server 2008 inside of a cabal sandbox (1.18.*) I get the following error: 尝试在Windows Server 2008的综合沙盒(1.18。*)内安装网络软件包(cabal安装网络)时,出现以下错误:
C:\Users\user\Project>cabal install network --prefix=C:\Users\user\Project
Resolving dependencies...
Configuring network-2.4.2.2...
configure: error: invalid package name: 0
Failed to install network-2.4.2.2
cabal: Error: some packages failed to install:
network-2.4.2.2 failed during the configure step. The exception was:
ExitFailure 1
Important to note that network is installed globally via the haskell platform, but won't install in the sandbox for a strange reason. 需要注意的重要一点是,网络是通过haskell平台全局安装的,但出于奇怪的原因,它不会安装在沙箱中。 The exact error looks like configure: error: invalid package name: 0
确切的错误看起来像configure: error: invalid package name: 0
What could be prompting the package name to be 0? 是什么提示软件包名称为0?
The problem is you are installing from the Windows command prompt, you should instead use a Mingw or Cygwin shell. 问题是您要从Windows命令提示符进行安装,而应使用Mingw或Cygwin Shell。 I find it easiest to install using Cygwin , then running: 我发现使用Cygwin进行安装最简单,然后运行:
WHICHGHC=`which ghc` && PATH=`dirname $WHICHGHC`/../mingw/bin:$PATH && cabal install network --configure-option --host=i386-unknown-mingw32 --global --enable-library-profiling
The full instructions, including alternative forms and feedback, are available on this blog post . 完整的说明,包括其他形式和反馈,可在此博客文章中获得 。
使用MinGHC ,它为Windows的二进制安装程序提供了足够的实用程序,使得标准的cabal install
可以成功安装network
程序包。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.