简体   繁体   中英

installing cairo on Mac OS Lion

I've just got a new mac, and I'm struggling to install Cairo for use with Haskell (diagrams in particular). I remember having a lot of problems with my previous machine, but I'm at a dead end this time.

$ 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

The program pkg-config needs to be installed. There are various ways to do this (eg I imagine it's available as part of MacPorts and similar package managers) but in the event that you need to download and install it from source, this is the place:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM