gpt4 book ai didi

haskell - 无法在 Windows 上安装 cairo haskell 绑定(bind)

转载 作者:行者123 更新时间:2023-12-02 10:46:48 24 4
gpt4 key购买 nike

我正在尝试在 Windows 7 上安装 cairo-0.12.4 Haskell 软件包。我首先下载并解压 Gtk+2 并将其 bin 子目录添加到 PATH 中。然后我尝试使用额外的库运行 cabal 并包括:

cabal --extra-lib-dirs="d:\Program Files (x86)\Gtk+\lib" 
--extra-include-dirs="d:\Program Files (x86)\Gtk+\include" install

但我收到以下错误

 Reading available packages...
Choosing modular solver.
Resolving dependencies...
Ready to install cairo-0.12.4
Waiting for install task to finish...
Extracting
C:\Users\abailly\AppData\Roaming\cabal\packages\hackage.haskell.org\cairo\0.12.4\cairo-0.12.4.tar.gz
to C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368...
Updating cairo.cabal with the latest revision from the index.
creating
C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup
creating
C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist
creating
C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup
d:\Program Files (x86)\Haskell Platform\2012.2.0.0\bin\ghc.exe --make C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-
0.12.4\Setup.hs -o C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\setup.exe -odir C:\Users\abailly\
AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup -hidir C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.
12.4\dist\setup -i -iC:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4 -package Cabal-1.14.0
[1 of 2] Compiling SetupWrapper ( C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\SetupWrapper.hs, C:\Users
\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\SetupWrapper.o )
[2 of 2] Compiling Main ( C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\Setup.hs, C:\Users\abaill
y\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\Main.o )
Linking C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\setup.exe ...
C:\Users\abailly\AppData\Local\Temp\cairo-0.12.4-2368\cairo-0.12.4\dist\setup\setup.exe
configure --verbose=2 --ghc --prefix=C:\Users\abailly\AppData\Roaming\cabal
--user --flags=cairo_svg --flags=cairo_ps --flags=cairo_pdf
--extra-include-dirs=D:\Program Files (x86)\Gtk+\include
--extra-lib-dirs=D:\Program Files (x86)\Gtk+\lib --constraint=mtl ==2.1.2
--constraint=bytestring ==0.9.2.1 --constraint=base ==4.5.0.0
--constraint=array ==0.4.0.0 --disable-tests --disable-benchmarks
[1 of 2] Compiling Gtk2HsSetup ( Gtk2HsSetup.hs, dist\setup-wrapper\Gtk2HsSetup.o )
[2 of 2] Compiling Main ( SetupMain.hs, dist\setup-wrapper\Main.o )
Linking dist/setup-wrapper\setup.exe ...
Configuring cairo-0.12.4...
Flags chosen: cairo_svg=True, cairo_ps=True, cairo_pdf=True
Dependency array ==0.4.0.0: using array-0.4.0.0
Dependency base ==4.5.0.0: using base-4.5.0.0
Dependency bytestring ==0.9.2.1: using bytestring-0.9.2.1
Dependency mtl ==2.1.2: using mtl-2.1.2
Dependency cairo-pdf -any: using version 1.10.2
Dependency cairo-ps -any: using version 1.10.2
Dependency cairo-svg -any: using version 1.10.2
Dependency cairo >=1.2.0: using version 1.10.2
Using Cabal-1.14.0 compiled by ghc-7.4
Using compiler: ghc-7.4.1
Using install prefix: C:\Users\abailly\AppData\Roaming\cabal
Binaries installed in: C:\Users\abailly\AppData\Roaming\cabal\bin
Libraries installed in:
C:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4\ghc-7.4.1
Private binaries installed in:
C:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4
Data files installed in: C:\Users\abailly\AppData\Roaming\cabal\cairo-0.12.4
Documentation installed in:
C:\Users\abailly\AppData\Roaming\cabal\doc\cairo-0.12.4
Using alex version 3.0.1 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\lib\extralibs\bin\alex.exe
Using ar found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\ar.exe
No c2hs found
Using cpphs version 1.16 found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\cpphs.exe
No ffihugs found
Using gcc version 4.5.2 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\gcc.exe
Using ghc version 7.4.1 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\bin\ghc.exe
Using ghc-pkg version 7.4.1 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\bin\ghc-pkg.exe
No greencard found
Using gtk2hsC2hs version 0.13.6 found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\gtk2hsC2hs.exe
Using gtk2hsHookGenerator found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\gtk2hsHookGenerator.exe
Using gtk2hsTypeGen found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\gtk2hsTypeGen.exe
Using haddock version 2.10.0 found on system at: d:\Program Files
(x86)\Haskell Platform\2012.2.0.0\bin\haddock.exe
Using happy version 1.18.9 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\lib\extralibs\bin\happy.exe
No hmake found
Using hpc version 0.6 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\bin\hpc.exe
Using hsc2hs version 0.67 found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\bin\hsc2hs.exe
Using hscolour version 1.20 found on system at:
c:\Users\abailly\AppData\Roaming\cabal\bin\HsColour.exe
No hugs found
No jhc found
Using ld found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\ld.exe
No lhc found
No lhc-pkg found
No nhc98 found
Using pkg-config version 0.26 found on system at: d:\Program Files
(x86)\Gtk+\bin\pkg-config.exe
Using ranlib found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\ranlib.exe
Using strip found on system at: d:\Program Files (x86)\Haskell
Platform\2012.2.0.0\mingw\bin\strip.exe
Using tar found on system at: D:\Program Files (x86)\Git\bin\tar.exe
No uhc found
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-pdf
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-ps
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-svg
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo
setup.exe: Missing dependencies on foreign libraries:
* Missing C libraries: z, cairo
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Failed to install cairo-0.12.4
cabal.exe: Error: some packages failed to install:
Chart-0.16 depends on cairo-0.12.4 which failed to install.
cairo-0.12.4 failed during the configure step. The exception was:
ExitFailure 1
splot-0.3.8 depends on cairo-0.12.4 which failed to install.

当我尝试直接安装 cairo 时,我得到以下信息:

d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-pdf
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-ps
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo-svg
d:\Program Files (x86)\Gtk+\bin\pkg-config.exe --modversion cairo
setup.exe: Missing dependencies on foreign libraries:
* Missing C libraries: z, cairo
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Failed to install cairo-0.12.4
World file is already up to date.
cabal.exe: Error: some packages failed to install:
cairo-0.12.4 failed during the configure step. The exception was:
ExitFailure 1

我一无所知...

最佳答案

如果您阅读错误消息:

* Missing C libraries: z, cairo

它表示您需要安装 libz 和 cairo 库的库(和头文件)。在 *nix 系统上,这通常意味着只需使用包管理器安装这些包的 -dev 版本。在 Windows 上,我假设您会下载该库的源版本并安装。

关于haskell - 无法在 Windows 上安装 cairo haskell 绑定(bind),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15177540/

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