gpt4 book ai didi

haskell - 在 cygwin 中安装包 wreq 时出错

转载 作者:行者123 更新时间:2023-12-05 07:32:15 26 4
gpt4 key购买 nike

我试图在 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 中执行此操作,但结果相同。你能建议如何解决吗?

最佳答案

您应该修改 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

关于haskell - 在 cygwin 中安装包 wreq 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51347227/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com