How to install libusb?

I want to install libusb in ubuntu 14.04 LTS. I have downloaded libusb-1.0.9.tar.bz2 file from official site "" but now I am unable to install it. I want to use libusb for Reliance usb for net connection.

As I am new to linux so please mention every command that I need to run in terminal.

Thanks in advance.

Asked By: Priyansh


Since you are new to linux I suggest running the below command from terminal to install libusb directly from the repository:

>sudo apt-get install libusb-1.0-0-dev

If you wish to continue with the archive you have downloaded, refer to the instructions in the below link:

Answered By: Ron

This is how you install libusb:

sudo apt-get install libusb-1.0-0-dev

Note that if you are using libusb in a C/C++ program you should include it the following way:

#include <libusb-1.0/libusb.h>

and not like this:

#include <libusb.h>

This is a common mistake that I was making. Finally you compile like this:

g++ source.cpp `pkg-config --libs --cflags libusb-1.0`
Answered By: daltonfury42