Install and verify librealsense on Ubuntu 18.04


Installation environment

OS: Ubuntu 18.04 bionic
Kernel: x86_64 Linux 4.15.0-20-generic

The test passed the virtual machine Ubuntu 18.04 started by VMware station

Install realsense SDK

reference resources…\

Previous librealsense needs to be compiled for installation, but for Ubuntu lts kernels 4.4, 4.8, 4.10, 4.13, 4.15, 4.18 * 5.0 * 5.3 * you can use apt to install it directly.

It is recommended to use scientific Internet for installation, otherwise the download will be very slow

#Register public key
sudo apt-key adv --keyserver --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp:// --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE

#Add apt repository
sudo add-apt-repository "deb bionic main" -u
#Ubuntu 16 can be replaced by
# sudo add-apt-repository "deb xenial main" -u

#Install librealsense
sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils

Verify that the installation is successful

Re connect the realsense camera and run itrealsense-viewerTo verify that the installation is successful
Install and verify librealsense on Ubuntu 18.04

Upgrade librealsense

sudo apt-get update
sudo apt-get upgrade

Uninstall librealsense

#Uninstall all realsense related packages
dpkg -l | grep "realsense" | cut -d " " -f 3 | xargs sudo dpkg --purge

Contents and dependencies of related installation packages

Name Content Depends on
librealsense2-udev-rules Configures RealSense device permissions on kernel level
librealsense2-dkms DKMS package for Depth cameras-specific kernel extensions librealsense2-udev-rules
librealsense2 RealSense™ SDK runtime (.so) and configuration files librealsense2-udev-rules
librealsense2-utils Demos and tools available as a part of RealSense™ SDK librealsense2
librealsense2-dev Header files and symbolic link for developers librealsense2
librealsense2-dbg Debug symbols for developers librealsense2

It can be installed on demand