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:
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. The exact error looks like configure: error: invalid package name: 0
What could be prompting the package name to be 0?
The problem is you are installing from the Windows command prompt, you should instead use a Mingw or Cygwin shell. I find it easiest to install using Cygwin , then running:
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
程序包。
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.