2010-09-05 21 views
2

我安裝與使用MacPorts的wxWidgets然後運行命令:sudo cabal install wx,其中包括輸出:wxHaskell失敗,因爲它依賴於wx_macu-2.8

/bin/sh: wxdirect: command not found 
/bin/sh: wxdirect: command not found 
/bin/sh: wxdirect: command not found 
/bin/sh: wxdirect: command not found 
Configuring wxcore-0.12.1.6... 
setup: Missing dependency on a foreign library: 
* Missing C library: wx_macu-2.8 
This problem can usually be solved by installing the system package that 
provides this library (you may need the "-dev" version). If the library is 
already installed but in a non-standard location then you can use the flags 
--extra-include-dirs= and --extra-lib-dirs= to specify where it is. 
cabal: Error: some packages failed to install: 
wx-0.12.1.6 depends on wxcore-0.12.1.6 which failed to install. 
wxcore-0.12.1.6 failed during the configure step. The exception was: 
ExitFailure 1 

我得到了同樣的錯誤,當我使用這個命令:sudo cabal install wx --extra-include-dirs=/opt/local --extra-lib-dirs=/opt/local。我如何安裝wx_macu-2.8,或者做我需要做的事來解決這個問題?

回答

4

這是說你缺少一個C庫,而不是一個Haskell庫。 Cabal不能安裝任意的C庫。

檢查你的發行版的包管理器,確保你擁有與wxWidgets-2.8相關的所有東西,包括任何開發包。

+0

我知道我錯過了一個C庫,如果這還不清楚的話。我只是不知道爲什麼我錯過了它。我發現macports也有wxwidgets-devel,所以我正在安裝這個知道的東西。 – None 2010-09-08 01:27:29

+0

我安裝了wxwidgets-devel,並且正在使用'sudo cabal install wx --extra-include-dirs =/opt /遠。 – None 2010-09-10 03:23:02

+0

安裝工作! – None 2010-09-10 03:26:00

相關問題