无法安装wx

时间:2014-06-08 06:07:26

标签: haskell ubuntu cabal

我没有安装cabal:

$ cabal install wx
Resolving dependencies...
[1 of 1] Compiling Main             ( /tmp/wxc-0.90.1.1-30692/wxc-0.90.1.1/Setup.hs, /tmp/wxc-0.90.1.1-30692/wxc-0.90.1.1/dist/setup/Main.o )
Linking /tmp/wxc-0.90.1.1-30692/wxc-0.90.1.1/dist/setup/setup ...
Configuring wxc-0.90.1.1...

  Warning: No config found to match: /usr/bin/wx-config --version=2.9 --version-full
           in /usr/lib/x86_64-linux-gnu/wx/config
  If you require this configuration, please install the desired
  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.
  You may use wx-config --list to see all configs available in
  the default prefix.

readProcess failed: readProcess: wx-config "--version=2.9" "--version-full" (exit 1): failed
setup: failed
Failed to install wxc-0.90.1.1
cabal: Error: some packages failed to install:
wx-0.90.1.0 depends on wxc-0.90.1.1 which failed to install.
wxc-0.90.1.1 failed during the configure step. The exception was:
ExitFailure 1
wxcore-0.90.1.1 depends on wxc-0.90.1.1 which failed to install

在此之前我做了,他们安装没有错误:

 apt-get install libwxgtk2.8-dev
 apt-get install libglu-dev
 apt-get install g++

我也跑了$ cabal update

我该如何解决这个问题?

2 个答案:

答案 0 :(得分:2)

我在安装wxc 0.92时在Linux中遇到了同样的问题,并设法通过手动修复我的wxWidgets 3.02安装的一些问题来解决这个问题。

具体来说,wxHaskell的安装文件调用wx-config。在您的终端或shell中尝试此操作:wx-config --release应报告3,wx-config --version=3.0应完成,而不会显示任何消息。查看/bin/文件夹,应该有一个wx-config文件。这是一个脚本文件;编辑它。你会看到它指向/usr/lib64/wx/config/gtk2-unicode-release-2.9或类似的东西。将其更改为指向3.0版文件:它可能位于/usr/local/lib/wx/config/文件夹中。如果找不到该文件,请尝试从源代码而不是从二进制文件包安装wxWidgets

答案 1 :(得分:-1)

我遇到了同样的问题。要解决此问题,您只需在使用cabal安装wx之前安装wxWidgets。

https://github.com/wxWidgets/wxWidgets