libwebkit2gtk-4.0 not available in Ubuntu 24
Description
libwebkit2gtk-4.0 not available in Ubuntu 24 Repositories.
To Reproduce
Run wails build
Expected behaviour
Wails work as expected
Screenshots
# Building target: linux/amd64
• Generating bindings: Done.
• Installing frontend dependencies: Done.
• Compiling frontend: Done.
• Compiling application: # github.com/wailsapp/wails/v2/pkg/assetserver/webview
# [pkg-config --cflags -- gtk+-3.0 webkit2gtk-4.0 gio-unix-2.0 gtk+-3.0 webkit2gtk-4.0 gio-unix-2.0 gtk+-3.0 webkit2gtk-4.0]
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'webkit2gtk-4.0', required by 'virtual:world', not found
Package 'webkit2gtk-4.0', required by 'virtual:world', not found
Package 'webkit2gtk-4.0', required by 'virtual:world', not found
Attempted Fixes
No response
System Details
# Wails
Version | v2.8.2
Package Manager | apt
# System
┌───────────────────────────────────────────────────────────────────────────────────────┐
| OS | Ubuntu |
| Version | 24.04 |
| ID | ubuntu |
| Go Version | go1.22.3 |
| Platform | linux |
| Architecture | amd64 |
| CPU | 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz |
| GPU | TigerLake-LP GT2 [Iris Xe Graphics] (Intel Corporation) - Driver: i915 |
| Memory | 15GB |
└───────────────────────────────────────────────────────────────────────────────────────┘
# Dependencies
┌─────────────────────────────────────────────────────────────┐
| Dependency | Package Name | Status | Version |
| *docker | docker.io | Available | 24.0.7-0ubuntu4 |
| gcc | build-essential | Installed | 12.10ubuntu1 |
| libgtk-3 | libgtk-3-dev | Installed | 3.24.41-4ubuntu1 |
| libwebkit | Unknown | Not Found | |
| npm | npm | Installed | 10.5.2 |
| *nsis | nsis | Available | 3.09-4ubuntu1 |
| pkg-config | pkg-config | Installed | 1.8.1 |
└────────────────── * - Optional Dependency ──────────────────┘
Additional context
No response
Related to #3345.
A potential workaround for now is to use a devcontainer, it is a bit of a hackish workaround and I haven't been able to get the desktop GUI working (but the web server does, which means you can still make go calls from it), or you could even spin up a VM and do development inside there. (And in my testing, I had to use WEBKIT_DISABLE_COMPOSITING_MODE=1 NO_AT_BRIDGE=1 wails dev to ensure that things worked after installing the dependencies)
Not a perfect solution by any means, but if you must absolutely not be held up waiting, then a solution like that should work for the interim.
I believe this is fixed on master due to this PR: https://github.com/wailsapp/wails/pull/3461
I believe this is fixed on master due to this PR: #3461
Ah good catch, I originally missed that.
hello, not fixed yet in version: 2.8.2 cli. how can i temp fixed this issue.
https://wails.io/docs/guides/local-development
thank u