我有一些现有代码,如果没有 gtk2hs,我将无法运行。但我无法安装它。我之前尝试过使用 cabal,但发现现在正确的解决方案是从 darcs 构建。所以我这样做:
darcs get --lazy http://code.haskell.org/gtk2hs
cd gtk2hs
export PATH=$HOME/Library/Haskell/bin:$PATH
sh bootstrap.sh
得到这个:
Resolving dependencies...
Configuring gio-0.12.4.1...
setup: The pkg-config package gio-2.0 version >=2.16.4 is required but it
could not be found.
Resolving dependencies...
Configuring cairo-0.12.4.1...
setup: The pkg-config package cairo version >=1.2.0 is required but it could
not be found.
Resolving dependencies...
Configuring pango-0.12.4.1...
setup: At least the following dependencies are missing:
cairo >=0.12.0 && <0.13
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring gtk-0.12.4.1...
setup: At least the following dependencies are missing:
cairo >=0.12.0 && <0.13, pango >=0.12.0 && <0.13
setup: Run the 'configure' command first.
setup: Run the 'configure' command first.
setup: Run the 'configure' command first.
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring gtk3-0.12.4.1...
setup: At least the following dependencies are missing:
cairo >=0.12.0 && <0.13, pango >=0.12.0 && <0.13
setup: Run the 'configure' command first.
setup: Run the 'configure' command first.
setup: Run the 'configure' command first.
我在 osx 上使用 cabal 和 darcs 的最新版本。