2016-10-17 162 views
0

我在安裝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

回答

0

我認爲你需要安裝庫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://stackoverflow.com/questions/20098862/how-to-install-gtk-on-osx-for-use-with-g- gcc-compiler,我想我已經用'brew install gtk +'完成了這個工作' – stumped