Search code examples
windowshaskellcabalcabal-install

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:

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?


Solution

  • Use MinGHC, which provides binary installers for Windows with enough utilities that a standard cabal install can successfully install the network package.