distribution_linux.md 4.8 KB
Newer Older
E
Fixes  
Evgeni Raikhel 已提交
1
# Linux Distribution
2

3
#### Using pre-build packages
E
ev-mp 已提交
4
**Intel® RealSense™ SDK 2.0** provides installation packages for Intel X86/AMD64-based Debian distributions in [`dpkg`](https://en.wikipedia.org/wiki/Dpkg) format for Ubuntu 16/18/20 [LTS](https://wiki.ubuntu.com/LTS).    
E
ev-mp 已提交
5
The Realsense [DKMS](https://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support) kernel drivers package (`librealsense2-dkms`) supports Ubuntu LTS kernels 4.4, 4.8, 4.10, 4.13, 4.15, 4.18*, 5.0*, 5.3* and 5.4. Please refer to [Ubuntu Kernel Release Schedule](https://wiki.ubuntu.com/Kernel/Support) for further details.
6

7 8
#### Configuring and building from the source code
While we strongly recommend to use DKMS package whenever possible, there are certain cases where installing and patching the system manually is necessary:
E
ev-mp 已提交
9
 - Using SDK with non-LTS Ubuntu kernel versions: **4.16 **
10 11
 - Integration of user-specific patches/modules with `librealsense` SDK.
 - Adjusting the patches for alternative kernels/distributions.
12

13
The steps are described in [Linux manual installation guide](./installation.md)
14

15 16

## Installing the packages:
17
- Register the server's public key:  
18
`sudo apt-key adv --keyserver keys.gnupg.net --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE`
19 20
In case the public key still cannot be retrieved, check and specify proxy settings: `export http_proxy="http://<proxy>:<port>"`  
, and rerun the command. See additional methods in the following [link](https://unix.stackexchange.com/questions/361213/unable-to-add-gpg-key-with-apt-key-behind-a-proxy).  
21

22
- Add the server to the list of repositories:  
T
tkazik 已提交
23
`sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u`  
24

25
- Install the libraries (see section below if upgrading packages):  
E
Evgeni Raikhel 已提交
26
  `sudo apt-get install librealsense2-dkms`  
S
Sergey Dorodnicov 已提交
27
  `sudo apt-get install librealsense2-utils`  
28 29
  The above two lines will deploy librealsense2 udev rules, build and activate kernel modules, runtime library and executable demos and tools.  

30
- Optionally install the developer and debug packages:  
S
Sergey Dorodnicov 已提交
31 32
  `sudo apt-get install librealsense2-dev`  
  `sudo apt-get install librealsense2-dbg`  
33
  With `dev` package installed, you can compile an application with **librealsense** using `g++ -std=c++11 filename.cpp -lrealsense2` or an IDE of your choice.
34

35 36 37 38
Reconnect the Intel RealSense depth camera and run: `realsense-viewer` to verify the installation.

Verify that the kernel is updated :    
`modinfo uvcvideo | grep "version:"` should include `realsense` string
39

40
## Upgrading the Packages:
41 42 43 44 45 46 47 48 49 50
Refresh the local packages cache by invoking:  
  `sudo apt-get update`  

Upgrade all the installed packages, including `librealsense` with:  
  `sudo apt-get upgrade`

To upgrade selected packages only a more granular approach can be applied:  
  `sudo apt-get --only-upgrade install <package1 package2 ...>`  
  E.g:   
  `sudo apt-get --only-upgrade install  librealsense2-utils librealsense2-dkms`  
51 52

## Uninstalling the Packages:
S
Sergey Dorodnicov 已提交
53
**Important** Removing Debian package is allowed only when no other installed packages directly refer to it. For example removing `librealsense2-udev-rules` requires `librealsense2` to be removed first.
54

E
Fixes  
Evgeni Raikhel 已提交
55
Remove a single package with:   
S
schmidtp1 已提交
56
  `sudo apt-get purge <package-name>`  
57

E
Fixes  
Evgeni Raikhel 已提交
58 59
Remove all RealSense™ SDK-related packages with:   
  `dpkg -l | grep "realsense" | cut -d " " -f 3 | xargs sudo dpkg --purge`  
60 61 62 63 64 65

## Package Details:
The packages and their respective content are listed below:  

Name    |      Content   | Depends on |
-------- | ------------ | ---------------- |
E
Evgeni Raikhel 已提交
66 67
librealsense2-udev-rules | Configures RealSense device permissions on kernel level  | -
librealsense2-dkms | DKMS package for Depth cameras-specific kernel extensions | librealsense2-udev-rules
68 69 70 71
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
E
ev-mp 已提交
72 73 74 75 76 77
librealsense2-gl | GLSL extension module runtime and configuration file | librealsense2
librealsense2-gl-dev | GLSL development header files and symbolic link | librealsense2
librealsense2-gl-dbg | GLSL debug symbols required for debugging purposes | librealsense2
librealsense2-net | Data over Ethernet extension module, runtime and configuration file | librealsense2 
librealsense2-net-dev | Network module developer's files | librealsense2 
librealsense2-net-dbg | Network module debug symbols | librealsense2
78

E
Evgeni Raikhel 已提交
79
**Note** The packages include binaries and configuration files only.
80
Use the github repository to obtain the source code.