我有一些现有的代码,如果没有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和darc。
答案 0 :(得分:3)
在安装Haskell绑定之前,必须先安装gtk C库。如果您需要有关如何执行此操作的说明,请访问the installation instructions并查看操作系统部分。