2013-10-29 57 views
4

我有一些現有的代碼,我無法運行沒有gtk2hs。但我無法安裝它。我之前嘗試過cabal,但是發現現在正確的解決方案是從darcs開始構建。所以,我做的:與Darcs安裝gtk2hs

darcs get --lazy http://code.haskell.org/gtk2hs 
cd gtk2hs 
export PATH=$HOME/Library/Haskell/bin:$PATH 
sh bootstrap.sh 

而得到這樣的:

Resolving dependencies... 
Configuring gio-0.12.4.1... 
setup: The pkg-config package gio-2.0 version >=2.16.4 is required but it 
could not be found. 
Resolving dependencies... 
Configuring cairo-0.12.4.1... 
setup: The pkg-config package cairo version >=1.2.0 is required but it could 
not be found. 
Resolving dependencies... 
Configuring pango-0.12.4.1... 
setup: At least the following dependencies are missing: 
cairo >=0.12.0 && <0.13 
Package has never been configured. Configuring with default flags. If this 
fails, please run configure manually. 
Resolving dependencies... 
Configuring gtk-0.12.4.1... 
setup: At least the following dependencies are missing: 
cairo >=0.12.0 && <0.13, pango >=0.12.0 && <0.13 
setup: Run the 'configure' command first. 
setup: Run the 'configure' command first. 
setup: Run the 'configure' command first. 
Package has never been configured. Configuring with default flags. If this 
fails, please run configure manually. 
Resolving dependencies... 
Configuring gtk3-0.12.4.1... 
setup: At least the following dependencies are missing: 
cairo >=0.12.0 && <0.13, pango >=0.12.0 && <0.13 
setup: Run the 'configure' command first. 
setup: Run the 'configure' command first. 
setup: Run the 'configure' command first. 

我在用最新版本的陰謀和的darcs的OSX。

+0

您是否安裝了GTK?它看起來像我出於某種原因喜歡Cabal無法找到實際的GTK庫... – MathematicalOrchid

+0

@MathematicalOrchid你是怎麼發現的?這只是對我而言,錯誤看起來像無稽之談,他們試圖說什麼? 'pkg-config軟件包cairo版本> = 1.2.0是必需的,但它不能被發現' - pkg-config過期了嗎?還是那個開羅過時了?即我有GTK,但遇到同樣的問題。 –

+0

@MathematicalOrchid從作者的問題*(我的只有一個錯誤)*我可以推斷,版本錯誤,而不是一個開羅,仍然我有一個問題,理解的信息:爲什麼它試圖安裝«0.12.4.1 »版本,但抱怨«1.2.0»版本? –

回答

3

在安裝Haskell綁定到它們之前,您必須安裝gtk C庫。訪問the installation instructions,如果您需要關於如何執行此操作的說明,請查看您的操作系統部分。