Haskell cabal安装:缺少C库iw

时间:2013-10-16 07:40:23

标签: haskell xmonad cabal-install

我正在运行Fedora 19 x64,并且 我正在尝试通过cabal安装来安装xmobar。在安装了一堆依赖项后,我陷入了

cabal: Missing dependency on a foreign library:
* Missing C library: iw

我找不到关于这个iw库的任何信息,我对如何继续这一点感到有点迷失。

据我所知,我已经安装了所有标准的c lib。

sudo yum install glibc-common glibc glibc-devel glibc-headers glibc-utils glibc-devel      glib2-devel gcc-c++ gcc
Loaded plugins: auto-update-debuginfo, langpacks, refresh-packagekit
Package glibc-common-2.17-18.fc19.x86_64 already installed and latest version
Package glibc-2.17-18.fc19.x86_64 already installed and latest version
Package glibc-devel-2.17-18.fc19.x86_64 already installed and latest version
Package glibc-headers-2.17-18.fc19.x86_64 already installed and latest version
Package glibc-utils-2.17-18.fc19.x86_64 already installed and latest version
Package glibc-devel-2.17-18.fc19.x86_64 already installed and latest version
Package glib2-devel-2.36.3-3.fc19.x86_64 already installed and latest version
Package gcc-c++-4.8.1-1.fc19.x86_64 already installed and latest version
Package gcc-4.8.1-1.fc19.x86_64 already installed and latest version
Nothing to do

3 个答案:

答案 0 :(得分:3)

在Ubuntu下使用相同的解决方法:

cabal: Missing dependency on a foreign library: * Missing C library: iw

虽然我认为它也可以是 C语言构建工具的两个库,但已经解决了:

  1. liwc :用于操作C源代码的工具
  2. iwyu :分析C和C ++源文件中的#includes
  3. 这些添加后&编辑了 libiw-dev xmobar

答案 1 :(得分:2)

您的操作系统以不同的方式打包库。对于fedora,如果您缺少库A,您通常会找到名为libAlibA-devel的包。幸运的是,你不需要猜测 - 而只是问yum哪些包有一些感兴趣的文件。下面,我询问了共享对象文件libiw.so

yum whatprovides *libiw.so*
...
1:wireless-tools-devel-29-9.1.fc19.x86_64 : Development headers for the
                                      : wireless-tools package
Repo        : fedora
Matched from:
Filename    : /usr/lib64/libiw.so



1:wireless-tools-29-9.1.fc19.x86_64 : Wireless ethernet configuration tools
Repo        : installed
Matched from:
Provides    : libiw.so.29()(64bit)
Filename    : /lib64/libiw.so.29

我很惊讶Fedora会在没有这些软件包的情况下安装,但如果是这样的话,那么获取软件包只需要yum install命令。

答案 2 :(得分:1)

对于任何试图通过cabal安装xmobar的人来说,

包含iw的缺失包名为wireless_tools.

您可以使用

安装它
pacman -S wireless_tools