在Windows上未能安装MissingH和网络 [英] failing cabal install MissingH and network on Windows

查看:144
本文介绍了在Windows上未能安装MissingH和网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚安装了一个新的Haskell版本:HaskellPlatform-8.0.1-minimal-x86_64-setup-a,
我需要包MissingH,它需要包网络。
然而,cabal安装网络产生:

I just installed a new Haskell version: HaskellPlatform-8.0.1-minimal-x86_64-setup-a, I need the package MissingH, which needs the package network. However cabal install network yields:

$ cabal install network
Resolving dependencies...
cabal: Entering directory 'C:\cygwin64\tmp\cabal-tmp-6136\network-2.6.2.1'
Configuring network-2.6.2.1...
configure: WARNING: unrecognized options: --with-compiler
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking for gcc... C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe
checking whether the C compiler works... no
configure: error: in `/tmp/cabal-tmp-6136/network-2.6.2.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
cabal: Leaving directory 'C:\cygwin64\tmp\cabal-tmp-6136\network-2.6.2.1'
Failed to install network-2.6.2.1
cabal.exe: Error: some packages failed to install:
network-2.6.2.1 failed during the configure step. The exception was:
ExitFailure 77

首先,我尝试以管理员身份启动Cygwin命令窗口,但这并没有解决问题。
然后,我遵循堆栈无法构建网络 - 其中的config.log?

First, I tried to start Cygwin command window as administrator, but that didn't solve the problem. Then, I followed stack cannot build network - where's config.log?

虽然使用堆栈安装会产生成功,但是我必须运行堆栈设置


While installing using stack yields success, although I have to run stack setup

$ stack build
Compiler version mismatched, found ghc-8.0.1 (x86_64), but expected minor version match with ghc-7.10.3 (x86_64) (based on resolver setting in C:\tmp\network-2.6.2.1\stack.yaml).
Try running "stack setup" to install the correct GHC into C:\Users\<username>\AppData\Local\Programs\stack\x86_64-windows\

在堆栈设置,堆栈构建之后,我得到:

after stack setup, stack build, I get:

$ stack test
network-2.6.2.1: test (suite: regression)

testGetAddrInfo: [OK]

         Test Cases  Total
 Passed  1           1
 Failed  0           0
 Total   1           1

network-2.6.2.1: test (suite: simple)

Basic socket operations:
  testSend: [OK]
  testSendAll: [OK]
  testSendTo: [OK]
  testSendAllTo: [OK]
  testSendMany: [OK]
  testSendManyTo: [OK]
  testRecv: [OK]
  testOverFlowRecv: [OK]
  testRecvFrom: [OK]
  testOverFlowRecvFrom: [OK]
  testUserTimeout: [OK]

         Test Cases  Total
 Passed  11          11
 Failed  0           0
 Total   11          11

但我仍然无法继续MissingH。事实上,它仍然试图安装网络!

Yet still I can't continue with MissingH. In fact, it still tries to install network!

$ cabal install MissingH
Resolving dependencies...
cabal: Entering directory 'C:\cygwin64\tmp\cabal-tmp-5596\network-2.6.2.1'
Configuring network-2.6.2.1...
configure: WARNING: unrecognized options: --with-compiler
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking for gcc... C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe
checking whether the C compiler works... no
configure: error: in `/tmp/cabal-tmp-5596/network-2.6.2.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
cabal: Leaving directory 'C:\cygwin64\tmp\cabal-tmp-5596\network-2.6.2.1'
Failed to install network-2.6.2.1

我也试过: http://neilmitchell.blogspot.nl/2010/12/installing-haskell-network-library-on.html 这是在GHC 6.12.3和7.0.1(而不是新的8.0.1版本)上测试的。
不幸的是,我得到错误:

I also tried: http://neilmitchell.blogspot.nl/2010/12/installing-haskell-network-library-on.html which was tested on GHC 6.12.3 and 7.0.1 (and not on the new 8.0.1 version). Unfortunately, I get the error:

getEnv: invalid argument (The operation completed successfully.)

为了保持完整性,我的cabal版本:

Just for completeness, my cabal version:

$ cabal -V
cabal-install version 1.24.0.0
compiled using version 1.24.0.0 of the Cabal library

我缺少什么安装网络和MissingH?

What am I missing to install network and MissingH?

推荐答案

问题似乎是这样:


configure:error:in`/tmp/cabal-tmp-6136/network-2.6.2.1':

configure: error: in `/tmp/cabal-tmp-6136/network-2.6.2.1':

configure:error:C编译器无法创建可执行文件

configure: error: C compiler cannot create executables

没有安装C编译器或者它太旧了。
我们实际上并不支持Cygwin,请尝试安装msys2(实际上现在没有这个平台),并通过它进行编译。

Either you don't have a C compiler installed or it's too old. We don't actually support Cygwin anymore, try installing msys2 (actually doesn't platform come with this now?) and compiling via that.

你必须安装一个C编译器以及 pacman -S mingw-w64 - $(uname -m)-gcc 应该做的事情。我认为./configure脚本将无法检测到GHC的就地GCC。不确定,因为我有一段时间没有使用平台。

You'll have to install a C compiler as well pacman -S mingw-w64-$(uname -m)-gcc should do. The ./configure scripts won't be able to detect GHC's inplace GCC I think. Not sure as I haven't used platform in a while.

这篇关于在Windows上未能安装MissingH和网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆