2

我刚买了一台新的 mac,我正在努力安装 Cairo 以与 Haskell 一起使用(特别是图表)。我记得我以前的机器有很多问题,但这次我陷入了死胡同。

$ cabal install cairo
Resolving dependencies...
[1 of 2] Compiling SetupWrapper     ( /var/folders/7s/6fn_d5px0hs2204xfztw88v40000gp/T/cairo-0.12.3.1-66116/cairo-0.12.3.1/SetupWrapper.hs, /var/folders/7s/6fn_d5px0hs2204xfztw88v40000gp/T/cairo-0.12.3.1-66116/cairo-0.12.3.1/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main             ( /var/folders/7s/6fn_d5px0hs2204xfztw88v40000gp/T/cairo-0.12.3.1-66116/cairo-0.12.3.1/Setup.hs, /var/folders/7s/6fn_d5px0hs2204xfztw88v40000gp/T/cairo-0.12.3.1-66116/cairo-0.12.3.1/dist/setup/Main.o )
Linking /var/folders/7s/6fn_d5px0hs2204xfztw88v40000gp/T/cairo-0.12.3.1-66116/cairo-0.12.3.1/dist/setup/setup ...
[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 ...
Configuring cairo-0.12.3.1...
setup: The program pkg-config version >=0.9.0 is required but it could not be
found.
cabal: Error: some packages failed to install:
cairo-0.12.3.1 failed during the configure step. The exception was:
ExitFailure 1
4

1 回答 1

1

该程序pkg-config需要安装。有多种方法可以做到这一点(例如,我想它可以作为 MacPorts 和类似包管理器的一部分使用)但是如果您需要从源代码下载和安装它,这里就是:

http://www.freedesktop.org/wiki/Software/pkg-config/

于 2012-07-15T04:31:47.387 回答