-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
Problem
SharpWebview applications fail to run on Ubuntu 24.04+ because the required libwebkit2gtk-4.0
packages are no longer available. Ubuntu 24.04 only provides libwebkit2gtk-4.1
packages.
Current Behavior
- Applications built with SharpWebview fail to start on Ubuntu 24.04+
- No migration path available for newer Ubuntu versions
Expected Behavior
- SharpWebview should work on current Ubuntu LTS releases (24.04+)
- Should support both webkit2gtk-4.0 (older systems) and webkit2gtk-4.1 (newer systems)
Root Cause
The CMakeLists.txt hardcodes webkit2gtk-4.0:
pkg_check_modules(
webkit2 REQUIRED webkit2gtk-4.0
IMPORTED_TARGET
)
This has the additional problem of requiring the -dev
packages to be installed on Linux systems for runtime operation, which is not standard practice. Runtime applications should only require runtime packages.
$ dpkg -L libwebkit2gtk-4.0-37 | grep -E '\.(so|pc)$'
/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so
$ dpkg -L libwebkit2gtk-4.0-dev | grep -E '\.(so|pc)$'
/usr/lib/x86_64-linux-gnu/pkgconfig/webkit2gtk-4.0.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/webkit2gtk-web-extension-4.0.pc
/usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.0.so
Impact
- Blocks adoption on any current Ubuntu LTS system (24.04+)
- Forces unnecessary dev package dependencies on production systems
Workaround
The following workaround gets things working on Ubuntu 24.04 by adding the Ubuntu 22.04 repository to access webkit2gtk-4.0 packages. Use at your own risk - mixing packages from different Ubuntu versions can cause system instability.
- Add Ubuntu 22.04 repository
Add this to the bottom of /etc/apt/sources.list.d/ubuntu.sources
:
Types: deb
URIs: http://gb.archive.ubuntu.com/ubuntu
Suites: jammy
Components: main
- Install webkit2gtk-4.0 packages
sudo apt update
sudo apt install libwebkit2gtk-4.0-dev
sudo apt --fix-broken install
- Optional: Remove the jammy repository after installation to prevent accidental package mixing.
Metadata
Metadata
Assignees
Labels
No labels