【问题标题】:Haskell cabal install wx: missing C library wx_gtk2u_webview-3.0Haskell cabal 安装 wx:缺少 C 库 wx_gtk2u_webview-3.0
【发布时间】:2015-12-09 23:59:15
【问题描述】:

我正在尝试通过cabal install wx安装wx

Configuring wxc to build against wxWidgets 3.0
setup: Missing dependency on a foreign library:
* Missing C library: wx_gtk2u_webview-3.0
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.92.0.0 depends on wxc-0.92.0.0 which failed to install.
wxc-0.92.0.0 failed during the configure step. The exception was:
ExitFailure 1
wxcore-0.92.0.0 depends on wxc-0.92.0.0 which failed to install.

但我在/usr/lib 中有以下文件:

/usr/lib/libwx_gtk2u_webview-3.0.so
/usr/lib/libwx_gtk2u_webview-3.0.so.0
/usr/lib/libwx_gtk2u_webview-3.0.so.0.2.0

我也试过cabal install --extra-lib-dirs=/usr/lib/ wx,但无济于事。

cabal install wx Missing C library中的所有建议我也试过了

我在 archlinux 上,我有 wxgtk-3.0 和 wxgtk-2.8 multilib 和普通版本。我也尝试重新安装它们。

【问题讨论】:

  • 您可以尝试 Stackage/stack — 它能够获取 .cabal 文件并根据您指定的 GHC/LTS Stackage/Nightly 版本计算一组工作依赖项。我能够获得一些依赖于 WX 的示例代码,以便在 OS X 上轻松构建。

标签: haskell cabal wxhaskell


【解决方案1】:

我刚刚在 Arch 上遇到了同样的问题;当我尝试使用 --verbose=3 运行 cabal 时,看起来 libwx_gtk2u_webview-3.0 存在,但它抱怨 libwebkitgtk-1.0 丢失。在我安装了提供libwebkitgtk-1.0webkitgtk2 包后,wxHaskell 安装没有问题。

【讨论】:

    【解决方案2】:

    尝试“sudo apt-get install libwxgtk-webview3.0-dev”。它对我有用。

    【讨论】:

      猜你喜欢
      • 2012-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-04
      • 1970-01-01
      • 2019-05-07
      • 1970-01-01
      • 2020-03-15
      相关资源
      最近更新 更多