Linux libusb 安装及简单使用 一、参考文档: 1. libusb1 fails do_configure task with “udev support requested but libudev not installed” http://stackoverflow.com/questions/23712859/libusb1-fails-do-configure-task-with-udev-support-requested-but-libudev-not-ins 2. libusb compilation error on slackware 14 http://stackoverflow.com/questions/29552267/libusb-compilation-error-on-slackware-14 3. Jan Axelson's Generic HID example under Linux with libusb http://www.microchip.com/forums/m340898.aspx 4. Slackware- usb library http://www.linuxquestions.org/questions/slackware-14/slackware-usb-library-4175475048/ 二、下载libusb: 1. 网址:http://www.libusb.org/ 2. 下载:libusb-1.0.9,跳转到解压,并安装: ./configure && make && make install; 3. 下载:libusb-compat-0.1.4,跳转到解压,并安装(一定要安装,否则总是报各种错,本人用的是64位系统): ./configure && make && make install; 三、libusb安装错误: 1. 错误提示: checking for inline... inline checking operating system... Linux checking for library containing clock_gettime... -lrt checking libudev.h usability... no checking libudev.h presence... no checking for libudev.h... no configure: error: "udev support requested but libudev not installed" 2. 解决方法: sudo apt-get install libudev-dev 四、Example: reference:http://www.microchip.com/forums/m340898.aspx