Search code examples
linuxubuntu-14.04cabaludevhidapi

cabal install fails because missing C library


I want to install hemokit driver by the command cabal install hemokit command, but it's tells me that it fails when it's going to install the dependency 'hidapi'. And this is the message, which gives to me

`Configuring hidapi-0.1.3...
cabal: Missing dependency on a foreign library:
* Missing C library: udev
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.
Failed to install hidapi-0.1.3

then I run the command sudo apt-get install udev to install udev package, but the problem didn't solved!


Solution

  • The udev library is a critical component of Ubuntu. What's missing are the development headers. Try running sudo apt-get install libudev-dev first and then installing hemokit.