# [Bug] Can't Install `scrcpy` Dependencies on Ubuntu 24.10 – `libgbm-dev` Fails Due to Version Mismatch

scrcpy (v3.3)

This application mirrors Android devices (video and audio) connected via USB or TCP/IP and allows control using the computer’s keyboard and mouse. It does not require root access or an app installed on the device. It works on Linux , Windows , and macOS .

I’m trying to compile the latest scrcpy from source on Ubuntu 24.10, but ran into a dependency resolution issue while installing required packages.

When I try to install libgbm-dev:

sudo apt install libgbm-dev

I get the following error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgbm-dev : Depends: libgbm1 (= 24.2.8-1ubuntu1~24.04.1) but 24.2.8-1ubuntu1~24.10.1 is to be installed
E: Unable to correct problems, you have held broken packages.

also

sudo apt install ffmpeg libsdl2-2.0-0 adb wget                  gcc git pkg-config meson ninja-build libsdl2-dev                  libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev                  libswresample-dev libusb-1.0-0 libusb-1.0-0-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ffmpeg is already the newest version (7:6.1.1-3ubuntu5).
libsdl2-2.0-0 is already the newest version (2.30.0+dfsg-1ubuntu3.1).
libsdl2-2.0-0 set to manually installed.
adb is already the newest version (1:34.0.4-1build3).
wget is already the newest version (1.21.4-1ubuntu4.1).
gcc is already the newest version (4:13.2.0-7ubuntu1).
git is already the newest version (1:2.43.0-1ubuntu7.2).
pkg-config is already the newest version (1.8.1-2build1).
meson is already the newest version (1.3.2-1ubuntu1).
ninja-build is already the newest version (1.11.1-2).
libavcodec-dev is already the newest version (7:6.1.1-3ubuntu5).
libavdevice-dev is already the newest version (7:6.1.1-3ubuntu5).
libavformat-dev is already the newest version (7:6.1.1-3ubuntu5).
libavutil-dev is already the newest version (7:6.1.1-3ubuntu5).
libswresample-dev is already the newest version (7:6.1.1-3ubuntu5).
libusb-1.0-0 is already the newest version (2:1.0.27-1).
libusb-1.0-0-dev is already the newest version (2:1.0.27-1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgbm-dev : Depends: libgbm1 (= 24.2.8-1ubuntu1~24.04.1) but 24.2.8-1ubuntu1~24.10.1 is to be installed
 libwayland-dev : Depends: libwayland-client0 (= 1.22.0-2.1build1) but 1.23.0-1 is to be installed
                  Depends: libwayland-server0 (= 1.22.0-2.1build1) but 1.23.0-1 is to be installed
                  Depends: libwayland-cursor0 (= 1.22.0-2.1build1) but 1.23.0-1 is to be installed
                  Depends: libwayland-egl1 (= 1.22.0-2.1build1) but 1.23.0-1 is to be installed
 libxcb1-dev : Depends: libxcb1 (= 1.15-1ubuntu2) but 1.17.0-2 is to be installed
E: Unable to correct problems, you have held broken packages.

Seems like Ubuntu 24.10 is pulling newer versions of packages that don’t satisfy the strict version requirements of dev libraries from 24.04.

Anyone have a workaround that doesn’t involve downgrading or building every dep from source?

You can use Docker for it and play GUI through Docker.

What you can do is, build sdl2 and try to install scrcpy afterwards, I am able to install after doing so!

Follow below steps for building SDL2,

./configure --prefix=/usr
make -j8
sudo make install

After successful installation of the sdl2, you will able to build the scrcpy!

1 Like

@djkabutar After your suggestion, scrcpy is working now, but I am still not getting any display output

scrcpy -m1024 --video-bit-rate 2M --no-audio
scrcpy 3.3 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO:     -->   (usb)  BI7********EU                device  R*****0
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 46.2 MB/s (90752 bytes in 0.002s)
[server] INFO: Device: [realme] realme RMX3710 (Android 13)
libEGL warning: MESA-LOADER: egl: failed to open rknpu: driver not built!

INFO: Renderer: opengles2
INFO: OpenGL version: OpenGL ES 3.1 Mesa 24.2.8-1ubuntu1~24.10.1
INFO: Trilinear filtering enabled
INFO: Texture: 464x1024
adb devices
List of devices attached
BI**888888NEU	device

@djkabutar Which device you use for testing scrcpy

I think it seems the issue with the GL context, if I just record the screen and preview it, it works!

scrcpy --no-window --record=file.mp4 --no-audio