[BUG]: --cli requires OpenGL libs to be installed
What happened?
Running rpi-imager with --cli on Raspberry Pi OS Lite (with no desktop) fails because of missing OpenGL libraries.
$ sudo rpi-imager --cli --first-run-script ./firstrun.sh 2024-11-19-raspios-bookworm-arm64-lite.img.xz /dev/nvme0n1
/tmp/.mount_rpi-imjBVGEC/AppRun.wrapped: error while loading shared libraries: libGLX.so.0: cannot open shared object file: No such file or directory
I would expect the cli mode to work without those libs.
Workaround
I've installed additional packages one by one until it works:
sudo apt install libglx0
sudo apt install libopengl0
sudo apt install libegl1
sudo apt install libgl1-mesa-glx
Maybe only the last is needed due to dependencies.
Version
1.9.1
What host operating system were you using?
Linux
Host OS Version
Raspberry Pi OS Lite (64 bits)
Selected OS
Raspberry Pi OS Lite (64 bits)
Which Raspberry Pi Device are you using?
Raspberry Pi 5
What kind of storage device are you using?
SSD NVMe
OS Customisation
- [ ] Yes, I was using OS Customisation when the bug occurred.
Relevant log output
See more information in #961
A regrettable issue, however I'm going to have to close this as a duplicate of #961, as it's fundamentally the same issue: 'cli mode' is a flag against the GUI application, and as a result you must have GL libraries (and other GUI-supporting libraries) present to satisfy the dynamic linker.
A regrettable issue, however I'm going to have to close this as a duplicate of #961, as it's fundamentally the same issue: 'cli mode' is a flag against the GUI application, and as a result you must have GL libraries (and other GUI-supporting libraries) present to satisfy the dynamic linker.
Maybe put the GL libraries in the package dependencies/recommends?
I just updated from Ubuntu 25.04 to 25.10 and the graphical imager (both the 1.9.6 .deb and the 2.0.0-rc3 appimage) won't start because libOpenGL.so.0 is not found. 1.9.6 ran fine on 25.04, only tried the appimage on 25.10 because of this issue.
Installing libopengl0 fixed the problem for me. The cli did not start until libopengl0 was installed, fyi.