سؤال

I'm running Fedora 19 x64, and I'm trying to install xmobar via cabal install. After installing a bunch of dependencies, I'm stuck at

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

I can't find anything about this iw library and I'm a bit lost at how to continue.

I've got all of the standard c libs installed, as far as I can tell.

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
هل كانت مفيدة؟

المحلول 2

Libraries are packaged differently by your OS. For fedora, if you're missing library A, you often will find packages named libA and libA-devel. Luckily, you don't need to guess - instead just ask yum what packages has some file of interest. Below, I asked about the shared object file 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

I'm surprised Fedora would install without these packages, but if that's the case then obtaining the packages is just a yum install command away.

نصائح أخرى

Under Ubuntu the same workaround:

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

was resolved though I thought that it can be also two libraries for C language build tools:

  1. liwc : Tools for manipulating C source code
  2. iwyu : Analyze #includes in C and C++ source files

after these additions & libiw-dev library new xmobar was compiled.

For anyone trying to install xmobar through cabal on arch,

the missing package that includes iw is called wireless_tools.

You can install that with

pacman -S wireless_tools
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top