首页 > 解决方案 > lablgtk 在 Mac 上找不到 gtk+ 2.0

问题描述

我想lablgtk在我的 Mac 上安装以使用一些需要它的软件。我尝试安装它,opam install lablgtkmake world出现此错误:

=> This package requires gtk+ 2.0 development packages installed on your system
=> To solve pkg-config issues, you may need to do
   'export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig' and retry

我尝试使用opam depext -i lablgtk,但它发现 Gtk

Warning: gtk+ 2.24.32_2 is already installed and up-to-date
To reinstall 2.24.32_2, run `brew reinstall gtk+`

我做了导出并尝试过eval 'opam config env',但我一次又一次地遇到同样的错误。我安装了 Gtk+ 并使用了很多我在互联网上找到的 pkg 导出,但我无法解决这个问题。任何人都可以帮助我吗?

标签: macosgtkopamlablgtk

解决方案


For my case, it was that somehow pkg-config was broke so that it didn't have a link to libffi.pc which is required when the ./configure file building lablgtx package uses pkg-config to locate the installed gtx.h. Hence, it was fixed for my case by

export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"


推荐阅读