我已经毫无问题地安装了 gtk2hs-buildtools,但是当我尝试使用“cabal install gtk”安装 gtk 时,输出如下:
[gautam@gautam ~]$ cabal install gtk 解决依赖关系... [1 of 2] 编译 SetupWrapper ( /tmp/cairo-0.12.213784/cairo-0.12.2/SetupWrapper.hs, /tmp/cairo-0.12.213784/cairo-0.12.2/dist/setup/SetupWrapper.o ) [2 of 2] 编译 Main ( /tmp/cairo-0.12.213784/cairo-0.12.2/Setup.hs, /tmp/cairo-0.12.213784/cairo-0.12.2/dist/setup/Main.o ) 正在链接 /tmp/cairo-0.12.213784/cairo-0.12.2/dist/setup/setup ... [1 of 2] 编译 Gtk2HsSetup ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o ) [2 of 2] 编译 Main (SetupMain.hs, dist/setup-wrapper/Main.o) 链接 dist/setup-wrapper/setup ... 找不到 gtk2hsC2hs 请先安装 `gtk2hs-buildtools` 并检查安装目录是否在您的 PATH 中(例如 HOME/.cabal/bin)。 [1 of 2] 编译 SetupWrapper ( /tmp/glib-0.12.213784/glib-0.12.2/SetupWrapper.hs, /tmp/glib-0.12.213784/glib-0.12.2/dist/setup/SetupWrapper.o ) [2 of 2] 编译 Main ( /tmp/glib-0.12.213784/glib-0.12.2/Setup.hs, /tmp/glib-0.12.213784/glib-0.12.2/dist/setup/Main.o ) 正在链接 /tmp/glib-0.12.213784/glib-0.12.2/dist/setup/setup ... [1 of 2] 编译 Gtk2HsSetup ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o ) [2 of 2] 编译 Main (SetupMain.hs, dist/setup-wrapper/Main.o) 链接 dist/setup-wrapper/setup ... 找不到 gtk2hsC2hs 请先安装 `gtk2hs-buildtools` 并检查安装目录是否在您的 PATH 中(例如 HOME/.cabal/bin)。 cabal:错误:某些软件包无法安装: cairo-0.12.2 在配置步骤中失败。例外是: 退出失败 1 gio-0.12.2 依赖于安装失败的 glib-0.12.2。 glib-0.12.2 在配置步骤中失败。例外是: 退出失败 1 gtk-0.12.2 依赖于安装失败的 glib-0.12.2。 pango-0.12.2 依赖于安装失败的 glib-0.12.2。 [gautam@gautam ~]$
这个问题出现在我的 Mac 和 Fedora VM 上。有人知道如何解决这个问题吗?谢谢!