Introduction to libgusb

The libgusb package contains the GObject wrappers for libusb-1.0 that makes it easy to do asynchronous control, bulk and interrupt transfers with proper cancellation and integration into a mainloop.



Development versions of BLFS may not build or run some packages properly if dependencies have been updated since the most recent stable versions of the book.

Package Information

libgusb Dependencies


JSON-GLib-1.6.6 and libusb-1.0.26




User Notes:

Installation of libgusb

Install libgusb by running the following commands:

mkdir build &&
cd    build &&

meson --prefix=/usr --buildtype=release -Ddocs=false .. &&

To test the results, issue: ninja test.

Now, as the root user:

ninja install

Command Explanations

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

-Ddocs=false: building documentation needs Gi-DocGen-2023.1. Remove this switch if you have installed gi-docgen, and you wish to build the API documentation. If this option is used, use the following command to fix the directory name of the API documentation after this package is installed:

mv -v /usr/share/doc/libgusb{,-0.4.5}


Installed Programs: gusbcmd
Installed Library:
Installed Directories: /usr/include/gusb-1 and /usr/share/doc/libgusb-0.4.5 (if gi-docgen is used)

Short Descriptions


is a debugging tool for the libgusb library

contains the libgusb API functions