librealsense: librealsense2-udev-rules 2.49.0-0~realsense0.5199 fails on Ubuntu 20.04 docker


Required Info
Camera Model { D400 }
Firmware Version NA
Operating System & Version {Ubuntu 20.04 Docker)
Kernel Version (Linux Only) 5.8.0-63-generic
Platform PC
SDK Version 2.49.0-0~realsense0.5199
Language NA
Segment NA

Issue Description

We have a CI server that installs librealsense2-dev inside a Docker container based on Ubuntu 20.04. With the update to version 2.49.0-0~realsense0.5199, the installation of librealsense2-udev-rules fails with the following error:

root@f4fb0717a804:/workdir# sudo DEBIAN_FRONTEND=noninteractive apt install librealsense2-udev-rules
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  librealsense2-udev-rules
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
Need to get 7608 B of archives.
After this operation, 30.7 kB of additional disk space will be used.
Get:1 https://librealsense.intel.com/Debian/apt-repo focal/main amd64 librealsense2-udev-rules amd64 2.49.0-0~realsense0.5199 [7608 B]
Fetched 7608 B in 1s (12.6 kB/s)                   
Selecting previously unselected package librealsense2-udev-rules:amd64.
(Reading database ... 134631 files and directories currently installed.)
Preparing to unpack .../librealsense2-udev-rules_2.49.0-0~realsense0.5199_amd64.deb ...
Unpacking librealsense2-udev-rules:amd64 (2.49.0-0~realsense0.5199) ...
Setting up librealsense2-udev-rules:amd64 (2.49.0-0~realsense0.5199) ...
+ echo \nPostinst script activated...

Postinst script activated...
+ mkdir -p /home/root/Documents/librealsense2
+ rsync -avh --ignore-errors usr/share/librealsense2/presets /home/root/Documents/librealsense2
sending incremental file list
rsync: change_dir "/usr/share/librealsense2" failed: No such file or directory (2)

sent 18 bytes  received 12 bytes  60.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
dpkg: error processing package librealsense2-udev-rules:amd64 (--configure):
 installed librealsense2-udev-rules:amd64 package post-installation script subprocess returned error exit status 23
Errors were encountered while processing:
 librealsense2-udev-rules:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)

Seems like the issue is that /usr/share/librealsense2 isn’t created for some reason.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20

Most upvoted comments

@wngreene , a patch that addresses the installation issue and potentially resolves the Docker compatibility has been released. Please upgrade the Debians and update.

I was able to circumvent the No such file or directory error message by creating the required directories before installing the librealsense2-udev-rules package:

$ sudo mkdir -p /usr/share/librealsense2/presets
$ sudo apt install -y librealsense2-udev-rules

This seems to have done the trick:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  librealsense2-udev-rules
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/7,606 B of archives.
After this operation, 30.7 kB of additional disk space will be used.
Selecting previously unselected package librealsense2-udev-rules:amd64.
(Reading database ... 238953 files and directories currently installed.)
Preparing to unpack .../librealsense2-udev-rules_2.49.0-0~realsense0.5198_amd64.deb ...
Unpacking librealsense2-udev-rules:amd64 (2.49.0-0~realsense0.5198) ...
Setting up librealsense2-udev-rules:amd64 (2.49.0-0~realsense0.5198) ...
+ echo \nPostinst script activated...

Postinst script activated...
+ mkdir -p /home/erios/Documents/librealsense2
+ rsync -avh --ignore-errors usr/share/librealsense2/presets /home/erios/Documents/librealsense2
sending incremental file list

sent 58 bytes  received 17 bytes  150.00 bytes/sec
total size is 0  speedup is 0.00

Obviously this is not an acceptable solution, but I hope it helps pinpoint the source of the issue.

I have highlighted this case to Intel. Thanks everyone for your reports. And thanks very much @xperroni for your workaround!