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:UsersRomanAppDataRoamingcaballogsghc-8.4.3wreq-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 ( NetworkWreqCacheStore.hs, distbuildNetworkWreqCacheStore.o )
[ 2 of 15] Compiling Network.Wreq.Internal.OAuth1 ( NetworkWreqInternalOAuth1.hs, distbuildNetworkWreqInternalOAuth1.o )
[ 3 of 15] Compiling Network.Wreq.Internal.Types ( NetworkWreqInternalTypes.hs, distbuildNetworkWreqInternalTypes.o )
[ 4 of 15] Compiling Network.Wreq.Lens.Machinery ( NetworkWreqLensMachinery.hs, distbuildNetworkWreqLensMachinery.o )
[ 5 of 15] Compiling Network.Wreq.Internal.Lens ( NetworkWreqInternalLens.hs, distbuildNetworkWreqInternalLens.o )
ghc.exe: unable to load package `network-2.7.0.2'
ghc.exe: | C:UsersRomanAppDataRoamingcabalx86_64-windows-ghc-8.4.3network-2.7.0.2-HRKpEmrZF0Z7oBCs9x5PCRHSnetwork-2.7.0.2-HRKpEmrZF0Z7oBCs9x5PCR.o: unknown symbol `acceptNewSock'
cabal: Leaving directory 'E:cygwin64tmpcabal-tmp-13148wreq-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中做这件事,但结果是一样的。你能建议怎么解决吗?
您应该修改cabal配置文件(您可以通过调用cabal user-config init
找到它(,以包含以下三行(更改为指向平台的正确版本(
extra-prog-path: C:Program FilesHaskell Platform8.2.2msysusrbin
extra-lib-dirs: C:Program FilesHaskell Platform8.2.2mingwlib
extra-include-dirs: C:Program FilesHaskell Platform8.2.2mingwinclude