I'm working on a project that utilizes the Yepkit USB Switchable Hub, but keep encountering a problem when attempting to build the Yepkit program on my Raspberry pi running Raspbian Jessie Lite.
The documentation says to:
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install libusb-1.0-0
both return saying I have the newest version.
The next step says to pull the github source code, which I did using:
git clone https://github.com/Yepkit/ykush.git
then changed to the ykush directory and attempt the build
sudo ./build.sh
This resulted in the following error:
sudo ./build.sh
Checking for git...
Fetching latest version of hidapi...
Cloning into 'hidapi'...
remote: Counting objects: 2006, done.
remote: Total 2006 (delta 0), reused 0 (delta 0), pack-reused 2006
Receiving objects: 100% (2006/2006), 2.72 MiB | 1.15 MiB/s, done.
Resolving deltas: 100% (1174/1174), done.
Checking connectivity... done.
Building hidapi...
make: Entering directory '/home/atticakes/ykush/hidapi/linux'
cc -Wall -g -fpic -c -I../hidapi `pkg-config libusb-1.0 --cflags` hid.c -o hid.o
hid.c:44:21: fatal error: libudev.h: No such file or directory
#include <libudev.h>
^
compilation terminated.
Makefile-manual:40: recipe for target 'hid.o' failed
make: *** [hid.o] Error 1
make: Leaving directory '/home/atticakes/ykush/hidapi/linux'
cp: cannot stat ‘hidapi/linux/libhidapi-hidraw.so’: No such file or directory
make: Entering directory '/home/atticakes/ykush/hidapi/libusb'
cc -Wall -g -fpic -c -I../hidapi `pkg-config libusb-1.0 --cflags` hid.c -o hid.o
g++ -Wall -g -fpic -c -I../hidapi `pkg-config libusb-1.0 --cflags` ../hidtest/hidtest.cpp -o ../hidtest/hidtest.o
g++ -Wall -g hid.o ../hidtest/hidtest.o `pkg-config libusb-1.0 --libs` -lrt -lpthread -o hidtest-libusb
cc -Wall -g `pkg-config libusb-1.0 --libs` -lrt -lpthread -shared -fpic -Wl,-soname,libhidapi-libusb.so.0 hid.o -o libhidapi-libusb.so
make: Leaving directory '/home/atticakes/ykush/hidapi/libusb'
‘hidapi/libusb/libhidapi-libusb.so’ -> ‘ykushcmd/linux/libhidapi-libusb.so’
Configuring ykush app files...
Building ykush command...
g++ -L/home/atticakes/ykush/ykushcmd/linux -o bin/ykushcmd ykushcmd/objs/ykushcmd.o ykushcmd/objs/commandParser.o ykushcmd/objs/usbcom.o -lhidapi-libusb -lusb-1.0 -ludev
/usr/bin/ld: cannot find -ludev
collect2: error: ld returned 1 exit status
Makefile:9: recipe for target 'ykushcmd' failed
make: *** [ykushcmd] Error 1
I tried digging around, but the only answers I found were something relating to linking libusb?
I figured I'd ask here before sending a support inquiry into Yepkit's support team, in hopes of making a much easier to use Raspberry Pi directed list of instructions.
As added information I have made sure to run apt-get update and apt-get upgrade as well as making sure raspi-config is up to date.