0

我在安装lablgtk 时遇到问题。当我输入opam install lablgtk

The following actions will be performed:
  ∗  install lablgtk 2.18.5

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  
[lablgtk] Archive in cache

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  
[ERROR] The compilation of lablgtk failed at "./configure --prefix
        /Users/name/.opam/4.03.0
        LABLGLDIR=/Users/name/.opam/4.03.0/lib/lablgl".
Processing  1/1: [lablgtk: ocamlfind remove]
#=== ERROR while installing lablgtk.2.18.5 ====================================#
# opam-version 1.2.2
# os           darwin
# command      ./configure --prefix /Users/name/.opam/4.03.0 LABLGLDIR=/Users/name/.opam/4.03.0/lib/lablgl
# path         /Users/name/.opam/4.03.0/build/lablgtk.2.18.5
# compiler     4.03.0
# exit-code    1
# env-file     /Users/name/.opam/4.03.0/build/lablgtk.2.18.5/lablgtk-9935-1872ec.env
# stdout-file  /Users/name/.opam/4.03.0/build/lablgtk.2.18.5/lablgtk-9935-1872ec.out
# stderr-file  /Users/name/.opam/4.03.0/build/lablgtk.2.18.5/lablgtk-9935-1872ec.err
### stdout ###
# [...]
# checking whether we are using the GNU C compiler... yes
# checking whether gcc accepts -g... yes
# checking for gcc option to accept ISO C89... none needed
# checking whether C compiler accepts -fno-unwind-tables... yes
# checking platform... Unix
# checking native dynlink... checking for pkg-config... /usr/local/bin/pkg-config
# checking for GTK+ - version >= 2.0.0... no
# *** Could not run GTK+ test program, checking why...
# *** The test program failed to compile or link. See the file config.log for the
# *** exact error that occured. This usually means GTK+ is incorrectly installed.
### stderr ###
# configure: WARNING: Cannot find camlp4o; please do not modify .ml4 files.
# configure: error: GTK+ is required



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  
The following actions failed
  ∗  install lablgtk 2.18.5
No changes have been performed

=-=- lablgtk.2.18.5 troubleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  
=> 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' (macports)
   or 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig' (homebrew)
   and retry

即使当我输入时,brew install gtk+我被告知: Warning: gtk+-2.24.30 already installed

4

1 回答 1

0

我认为您需要安装该库libgtk2.0-dev

尝试sudo apt-get install libgtk2-dev使用 debian 基础发行版。

在 Mac OSX 上,有一些事情要做,大部分可以在这里找到:http ://www.gtk.org/download/macos.php

于 2016-10-17T06:25:33.913 回答