rpi-imager icon indicating copy to clipboard operation
rpi-imager copied to clipboard

[BUG]: --cli requires OpenGL libs to be installed

Open graham2071 opened this issue 10 months ago • 1 comments

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


graham2071 avatar Feb 22 '25 15:02 graham2071

See more information in #961

lurch avatar Feb 24 '25 09:02 lurch

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.

tdewey-rpi avatar Apr 30 '25 10:04 tdewey-rpi

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?

calston avatar May 14 '25 14:05 calston

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.

nalcabio-tom avatar Oct 10 '25 22:10 nalcabio-tom

Installing libopengl0 fixed the problem for me. The cli did not start until libopengl0 was installed, fyi.

nalcabio-tom avatar Oct 10 '25 22:10 nalcabio-tom