安装lablgtk时遇到问题

问题描述:

我在安装lablgtk时遇到问题。当我在opam install lablgtk安装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

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

尝试sudo apt-get install libgtk2-dev为debian基地分布。

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

+0

我认为Mac的不能运行apt-get?我得到'sudo:apt-get:command not found' – stumped

+0

然后尝试使用brew或查找如何在Mac上安装它。 ;-) – Lhooq

+0

Hm从谷歌搜索“brew安装libtk2-dev”我最终在这里http://*.com/questions/20098862/how-to-install-gtk-on-osx-for-use-with-g- gcc-compiler,我想我已经用'brew install gtk +'完成了这个工作' – stumped