在cygwin中安装wreq软件包时出错

时间:2018-07-15 09:50:44

标签: haskell cygwin cabal wreq

im试图在cygwin中安装wreq软件包并出现以下错误:

$ cabal install wreq
Resolving dependencies...
Configuring wreq-0.5.2.1...
Building wreq-0.5.2.1...
Failed to install wreq-0.5.2.1
Build log ( C:\Users\Roman\AppData\Roaming\cabal\logs\ghc-8.4.3\wreq-0.5.2.1-6ipbKJAZXTn5wJPWmA5RGW.log ):
Preprocessing library for wreq-0.5.2.1..
Building library for wreq-0.5.2.1..
[ 1 of 15] Compiling Network.Wreq.Cache.Store ( Network\Wreq\Cache\Store.hs, dist\build\Network\Wreq\Cache\Store.o )
[ 2 of 15] Compiling Network.Wreq.Internal.OAuth1 ( Network\Wreq\Internal\OAuth1.hs, dist\build\Network\Wreq\Internal\OAuth1.o )
[ 3 of 15] Compiling Network.Wreq.Internal.Types ( Network\Wreq\Internal\Types.hs, dist\build\Network\Wreq\Internal\Types.o )
[ 4 of 15] Compiling Network.Wreq.Lens.Machinery ( Network\Wreq\Lens\Machinery.hs, dist\build\Network\Wreq\Lens\Machinery.o )
[ 5 of 15] Compiling Network.Wreq.Internal.Lens ( Network\Wreq\Internal\Lens.hs, dist\build\Network\Wreq\Internal\Lens.o )
ghc.exe: unable to load package `network-2.7.0.2'
ghc.exe:  | C:\Users\Roman\AppData\Roaming\cabal\x86_64-windows-ghc-8.4.3\network-2.7.0.2-HRKpEmrZF0Z7oBCs9x5PCR\HSnetwork-2.7.0.2-HRKpEmrZF0Z7oBCs9x5PCR.o: unknown symbol `acceptNewSock'
cabal: Leaving directory 'E:\cygwin64\tmp\cabal-tmp-13148\wreq-0.5.2.1'
cabal.exe: Error: some packages failed to install:
wreq-0.5.2.1-6ipbKJAZXTn5wJPWmA5RGW failed during the building phase. The
exception was:
ExitFailure 1

我也尝试在powershell中执行此操作,但结果相同。你能建议解决方法吗?

1 个答案:

答案 0 :(得分:0)

您应该修改cabal配置文件(可以通过调用cabal user-config init找到它),使其包含下面的三行(更改为指向平台的正确版本)

extra-prog-path: C:\Program Files\Haskell Platform\8.2.2\msys\usr\bin
extra-lib-dirs: C:\Program Files\Haskell Platform\8.2.2\mingw\lib
extra-include-dirs: C:\Program Files\Haskell Platform\8.2.2\mingw\include