Installing RTL-SDR: Cmake error - LibUSB 1.0 required to compile rtl-sdr

Need help installing or figuring out something about your SDR? Ask here.
GapingSnail
Posts: 4
Joined: Wed Apr 29, 2020 12:55 am

Installing RTL-SDR: Cmake error - LibUSB 1.0 required to compile rtl-sdr

Post by GapingSnail » Wed Apr 29, 2020 12:56 am

Hi there,

I am running Kali 2020.1 in VMWare.

I am trying to install the RTL-SDR drivers. So far I have:
- Installed git, cmake, libusb1.0-0dev build-essential and libc6-dev
- Run git clone git://git.osmocom.org/rtl-sdr.giv
- Created a build folder in /rtl-sdr
- Tried to run cmake ../ -DINTALL_UDEV_RULES=ON but I get an error "CMake Error at CMakeLists.txt:77 (message):LibUSB 1.0 required to compile rtl-sdr" I do have libusb installed so am unsure what is happening.

Having a look at CMakeLists.txt it looks like cmake can't find libusb:

Code: Select all

########################################################################
# Find build dependencies
########################################################################
if(WIN32 AND NOT MINGW)
    set(THREADS_USE_PTHREADS_WIN32 true)
endif()
find_package(Threads)
find_package(PkgConfig)
pkg_check_modules(LIBUSB libusb-1.0 IMPORTED_TARGET)

if(NOT LIBUSB_FOUND)
    message(FATAL_ERROR "LibUSB 1.0 required to compile rtl-sdr")
endif()
if(NOT THREADS_FOUND)
    message(FATAL_ERROR "pthreads(-win32) required to compile rtl-sdr")
endif()
Does anyone have any idea what is happening and how I might be able to fix it?

tim_rtd
Posts: 155
Joined: Fri Jun 30, 2017 11:34 am

Re: Installing RTL-SDR: Cmake error - LibUSB 1.0 required to compile rtl-sdr

Post by tim_rtd » Wed Apr 29, 2020 1:34 am

try this cmd
# whereis libusb-1

should come back with a path....... something like...
libusb-1: /usr/include/libusb-1.0

GapingSnail
Posts: 4
Joined: Wed Apr 29, 2020 12:55 am

Re: Installing RTL-SDR: Cmake error - LibUSB 1.0 required to compile rtl-sdr

Post by GapingSnail » Wed Apr 29, 2020 1:40 am

Thanks for the reply tim_rtd.

It's located in /usr/include/libusb-1.0 as you suggested. I am not sure exactly how to link this up though with cmake though.

tim_rtd
Posts: 155
Joined: Fri Jun 30, 2017 11:34 am

Re: Installing RTL-SDR: Cmake error - LibUSB 1.0 required to compile rtl-sdr

Post by tim_rtd » Wed Apr 29, 2020 2:02 am

I have and use vmware. Did you download the vmware version of Kali2020, or plain iso?
I'll try it by tomorrow night. It's slow downloading.

I would have bet the farm that libusb wasn't there :>} ..... I am curious about libusb1-0 vs -dev .. thing happening...

GapingSnail
Posts: 4
Joined: Wed Apr 29, 2020 12:55 am

Re: Installing RTL-SDR: Cmake error - LibUSB 1.0 required to compile rtl-sdr

Post by GapingSnail » Wed Apr 29, 2020 2:21 am

The VMware version of Kali...
I'll grab Ubuntu and spin up a VM and try it there too.

GapingSnail
Posts: 4
Joined: Wed Apr 29, 2020 12:55 am

Re: Installing RTL-SDR: Cmake error - LibUSB 1.0 required to compile rtl-sdr

Post by GapingSnail » Wed Apr 29, 2020 3:16 am

Update: so I downloaded a Mint iso (Ubuntu was downloading too slowly) and it works fine.

tim_rtd
Posts: 155
Joined: Fri Jun 30, 2017 11:34 am

Re: Installing RTL-SDR: Cmake error - LibUSB 1.0 required to compile rtl-sdr

Post by tim_rtd » Wed Apr 29, 2020 8:58 pm

I concur, Kali has a problem...same error here.

xgryph
Posts: 1
Joined: Sun May 10, 2020 7:15 pm

Re: Installing RTL-SDR: Cmake error - LibUSB 1.0 required to compile rtl-sdr

Post by xgryph » Sun May 10, 2020 7:24 pm

Hey, I'm seeing exactly the same issue as described in this thread.

I've tried the build on Ubuntu 18, 16 and Debian virtual machines, and on a physical Debian box and have exactly the same issue. For some reason Mint displays black a screen after installation.

Really not sure what to try next, any suggestions would be very appreciated as it just can't find libusb.

hotpaw2
Posts: 144
Joined: Sat Jan 14, 2017 11:07 pm
Contact:

Re: Installing RTL-SDR: Cmake error - LibUSB 1.0 required to compile rtl-sdr

Post by hotpaw2 » Sun May 10, 2020 7:44 pm

Make sure you installed libusb itself, and not just the libusb build essentials developer tools.

or download libusb from GitHub and build, and then make install it.

https://github.com/libusb/libusb

darumaya
Posts: 1
Joined: Tue Jun 23, 2020 10:08 pm

Re: Installing RTL-SDR: Cmake error - LibUSB 1.0 required to compile rtl-sdr

Post by darumaya » Tue Jun 23, 2020 10:13 pm

Install libglib2.0-dev
apt-get install libglib2.0-dev

and try again
cmake ../ -DINSTALL_UDEV_RULES=ON

It worked for me.

Post Reply