Cyberithub

How to Install librtlsdr-dev Package on Ubuntu 20.04 LTS (Focal Fossa)

Advertisements

In this article, we will see how to install librtlsdr-dev Package on Ubuntu 20.04 LTS. If you are looking to install software defined radio (SDR) receiver software called rtl-sdr for certain low-cost DVB-T/DAB(+) USB dongles based on the Realtek RTL2832U chip then you need to install librtlsdr-dev package in your System. This package is easily available on all Ubuntu/Debian based Linux systems and can be installed from default Ubuntu repo using apt or apt-get package manager. Here we will see the steps to install librtlsdr-dev Package on Ubuntu 20.04 LTS based systems in detail.

 

How to Install librtlsdr-dev Package on Ubuntu 20.04 LTS (Focal Fossa)

How to Install librtlsdr-dev Package on Ubuntu 20.04 LTS (Focal Fossa)

Also Read: How to Remove All Files Created by Make Command

Step 1: Prerequisites

a) You should have a running Ubuntu 20.04 LTS Server.

b) You should have sudo or root access to run privileged commands.

c) You should have apt or apt-get utility available in your Server.

 

Step 2: Update Your Server

In the very first step, you need to check for all the latest available updates and install it using sudo apt update && sudo apt upgrade command as shown below.

cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
[sudo] password for cyberithub:
Hit:1 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Hit:2 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://ppa.launchpad.net/flatpak/stable/ubuntu focal InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Get:6 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:7 http://ppa.launchpad.net/gencfsm/ppa/ubuntu focal InRelease
Hit:8 https://download.sublimetext.com apt/stable/ InRelease
Hit:9 http://ppa.launchpad.net/juju/stable/ubuntu focal InRelease
Hit:10 http://ppa.launchpad.net/libreoffice/ppa/ubuntu focal InRelease
Get:11 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Hit:12 http://ppa.launchpad.net/mojo-maintainers/ppa/ubuntu focal InRelease
Get:13 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1,074 kB]
Get:14 http://in.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [256 kB]
Fetched 1,553 kB in 4s (426 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
.................................................

 

Step 3: Install librtlsdr-dev 

In the next step, you can install librtlsdr-dev package from default Ubuntu repo by using sudo apt install librtlsdr-dev command as shown below. This will download and install the package along with all its dependencies.

cyberithub@ubuntu:~$ sudo apt install librtlsdr-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
librtlsdr0 libusb-1.0-0-dev libusb-1.0-doc
The following NEW packages will be installed:
librtlsdr-dev librtlsdr0 libusb-1.0-0-dev libusb-1.0-doc
0 upgraded, 4 newly installed, 0 to remove and 202 not upgraded.
Need to get 301 kB of archives.
After this operation, 2,079 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu focal/main amd64 libusb-1.0-0-dev amd64 2:1.0.23-2build1 [64.4 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu focal/main amd64 libusb-1.0-doc all 2:1.0.23-2build1 [172 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 librtlsdr0 amd64 0.6.0-3 [29.5 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu focal/universe amd64 librtlsdr-dev amd64 0.6.0-3 [34.5 kB]
Fetched 301 kB in 2s (156 kB/s)
Selecting previously unselected package libusb-1.0-0-dev:amd64.
(Reading database ... 219421 files and directories currently installed.)
Preparing to unpack .../libusb-1.0-0-dev_2%3a1.0.23-2build1_amd64.deb ...
Unpacking libusb-1.0-0-dev:amd64 (2:1.0.23-2build1) ...
Selecting previously unselected package libusb-1.0-doc.
Preparing to unpack .../libusb-1.0-doc_2%3a1.0.23-2build1_all.deb ...
Unpacking libusb-1.0-doc (2:1.0.23-2build1) ...
Selecting previously unselected package librtlsdr0:amd64.
Preparing to unpack .../librtlsdr0_0.6.0-3_amd64.deb ...
Unpacking librtlsdr0:amd64 (0.6.0-3) ...
Selecting previously unselected package librtlsdr-dev:amd64.
Preparing to unpack .../librtlsdr-dev_0.6.0-3_amd64.deb ...
Unpacking librtlsdr-dev:amd64 (0.6.0-3) ...
Setting up libusb-1.0-doc (2:1.0.23-2build1) ...
Setting up libusb-1.0-0-dev:amd64 (2:1.0.23-2build1) ...
Setting up librtlsdr0:amd64 (0.6.0-3) ...
Setting up librtlsdr-dev:amd64 (0.6.0-3) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...

 

Step 4: Verify Installation

Once installed successfully, you can verify the installed files path by using dpkg -L librtlsdr-dev command as shown below.

cyberithub@ubuntu:~$ dpkg -L librtlsdr-dev
/.
/usr
/usr/include
/usr/include/rtl-sdr.h
/usr/include/rtl-sdr_export.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/cmake
/usr/lib/x86_64-linux-gnu/cmake/rtlsdr
/usr/lib/x86_64-linux-gnu/cmake/rtlsdr/rtlsdrConfig.cmake
/usr/lib/x86_64-linux-gnu/cmake/rtlsdr/rtlsdrConfigVersion.cmake
/usr/lib/x86_64-linux-gnu/cmake/rtlsdr/rtlsdrTargets-relwithdebinfo.cmake
/usr/lib/x86_64-linux-gnu/cmake/rtlsdr/rtlsdrTargets.cmake
/usr/lib/x86_64-linux-gnu/librtlsdr.a
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/librtlsdr.pc
/usr/share
/usr/share/doc
/usr/share/doc/librtlsdr-dev
/usr/share/doc/librtlsdr-dev/README.Debian
/usr/share/doc/librtlsdr-dev/copyright
/usr/lib/x86_64-linux-gnu/librtlsdr.so
/usr/share/doc/librtlsdr-dev/changelog.Debian.gz

 

Step 5: Uninstall librtlsdr-dev 

In case you do not need the package anymore in your system, you can choose to uninstall it by using sudo apt remove librtlsdr-dev command as shown below.

cyberithub@ubuntu:~$ sudo apt remove librtlsdr-dev
[sudo] password for cyberithub:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
librtlsdr0 libusb-1.0-0-dev libusb-1.0-doc
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
librtlsdr-dev
0 upgraded, 0 newly installed, 1 to remove and 202 not upgraded.
After this operation, 148 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 219525 files and directories currently installed.)
Removing librtlsdr-dev:amd64 (0.6.0-3) ...

Leave a Comment