-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
libwebkit2gtk-4.0 not available in Ubuntu 24 & Debian 13 repositories #9662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment was marked as duplicate.
This comment was marked as duplicate.
Have you already solved this bug? |
see Ubuntu 24.04 LTS: error while loading shared libraries: libwebkit2gtk-4.0.so.37 sudo nano /etc/apt/sources.list.d/ubuntu.sources add this as it shows: then
for my development env, this woks |
for end user, use |
This is a bit dirty. It is recommended to restore /etc/apt/sources.list.d/ubuntu.sources to its original state after installing libwebkit2gtk-4.0-dev. Otherwise there will be weird errors, this is the one I'm currently experiencing: on kububtu,when Double-click the deb package, will install the deb using the QApt graphical interface by default (i.e. qapt-deb-installer) Double-click google-chrome-stable_current_amd64.deb 125.0.6422.112. It will originally prompt a dependency unsatisfied error in the QApt interface, but it can actually be installed using apt or dpkg after changing /etc/apt/sources.list.d/ubuntu.sources and apt update Double-clicking google-chrome-stable_current_amd64.deb 125.0.6422.112 does not prompt a dependency not satisfied error in the QApt interface, but displays that many dependencies need to be deleted. These dependencies are necessary for the system, including the desktop environment, desktop keyboard and mouse input devices, input methods, etc. Many contents and some installed software will be deleted. According to actual test, using apt to install this deb will automatically change to use the package in the server without causing problems. In addition, dpkg -i has not been tested. I don’t know whether apt install -f is required and whether it will cause problems. |
Your workaround doesn't work:
I tested also on Kali and there is a conflict with libjpegturbo0. So now, it is unable to use tauri on latest Ubuntu LTS / Kali |
The workaround in the OP worked on a clean Ubuntu 24.04. |
might who “Packaging these dependencies from ubuntu22.04 for installation on ubuntu24.04, and distinguishing between non-dev and dev versions “ can solve this problem? |
Not functional on Debian Testing (Trixie) / Unstable (sid), the package is not added to the repositories. Installing It's pretty much a show-stopper, there's no workaround atm. |
I'm thinking of switching my project to Tauri 2.0 beta right now so that it uses |
That will depend on the value of switching to you. I've switched because I want to try some the new features and it seems good but I'm aware some issues I have could be with v2 beta, especially as I'm pushing she boundaries. But finding issues is the point of a beta, and my using it. No better time to get things fixed fast! My app is though a demo not production so it won't be a disaster if I hit bugs, but so far it seems stable. The docs are a bit patchy and fluid, but the support I've had more than make up for that. |
I don't see 4.1 in my Ubuntu 20.04 VM. Does that mean it's not possible for the same binary to support both 20.04 and 24.04? I'm trying to think of workarounds I could do... maybe a shim script that launches either a 4.0-linked binary or a 4.1-linked binary after probing for libraries? It might work with Tauri's deb bundler, with some creativity, or I could hack around it. But if that means simultaneously building for both Tauri 1.x and 2.x it would be too much effort. Unless 2.x has a compromise between deb and AppImage where I can install systemd services and have post-install and pre-remove scripts, but also bundle WebKit. |
@ReactorScram I built on Ubuntu 24 after using the fix from the OP and in very early testing people found that the following worked:
The following did not work:
|
If you built your app on 24.04 none of what you wrote is supposed to actually work due to glib not being backword compatible like this (basically the reason for "build on the oldest system you want to support"), so i'd be very careful with that approach. |
@FabianLars that's exactly what I expected yet those are the facts! 🤷♂️ ... so far. |
Btw if you also distribute appimages, you're mostly immune to this issue. AppImages would also work on distroes where webkitgtk 4.1 is unavailable |
I have kali linux latest upgrade Debian 14 version. Solution I added debian 12 repo firs: |
@mdeniz63 The solution is really like a band aid I would say because you have to convince users to use an older repository. |
Workaround which worked for me OS: Ubuntu 24.04.1 LTS x86_64
|
100% Working!!!! |
Here's the Ubuntu workaround as a short script: #!/bin/bash
set -e
SOURCEFILE=$(mktemp -u /etc/apt/sources.list.d/jammy-webkit.XXXXXX.sources)
cleanup() {
echo "Cleaning up..."
sudo rm -f "$SOURCEFILE"
sudo apt update
}
trap cleanup EXIT
echo "Creating temporary jammy repository source..."
sudo tee "$SOURCEFILE" > /dev/null << 'EOF'
Types: deb
URIs: http://gb.archive.ubuntu.com/ubuntu
Suites: jammy
Components: main universe
Enabled: yes
EOF
echo "Updating package lists..."
sudo apt update
echo "Installing libwebkit2gtk-4.0-dev..."
if ! sudo apt install -y libwebkit2gtk-4.0-dev; then
echo "Failed to install libwebkit2gtk-4.0-dev"
exit 1
fi
echo "Success: libwebkit2gtk-4.0-dev is installed." |
If you're having trouble with the public key in Ubuntu Jammy (22.04), I recommend checking out this link where a detailed solution is provided: There, you'll find clear steps to resolve the public key error. I hope it helps! Cheers. |
This reports missing dependencies in Ubuntu 24.04.2:
(This affects other applications too. I came to this thread looking for a fix for this issue with typecatcher.) |
I'm skeptical because the biggest obstacle preventing Linux from running below the development environment isn't any particular library, but rather the GLIBC and GLIBCXX versions. If you compile a Tauri V2 AppImage on Ubuntu 24 and try to run it on Ubuntu 20, I'm certain you'll definitely encounter an error about GLIBC not meeting 2.35 requirement. In fact, I believe the correct solution is backward compatibility. Many open-source software on Linux follow this approach - they can work with either SDL2 or SDL3, QT5 or QT6. If Tauri implemented this compatibility feature, for application developers it would probably just be a matter of an npm parameter or a CMake switch, something like: |
True true, that was changed at some point to make the new IPC (and iirc some other stuff) work properly and we didn't have in mind that distro repos make non-latest versions unavailable. I think it's fair enough to say that we're at a point where this issue is open simply for visibility and will not be properly "fixed". We'll also have to switch to gtk4 in v3 (keeping min versions the same) which would make your suggestion even harder (not something the current team can handle, nor something that imo is worth considering how bad (and badly supported) webkitgtk 4.0 and to a degree 4.1 is compared to 6.0). |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
The Tauri v1 pre-requisite
libwebkit2gtk-4.0-dev
is not available in Ubuntu 24 repositories. This causes an error when installing the pre-requisites specified here, and when runningcargo tauri dev
on Ubuntu 24.Note:
libwebkit2gtk-4.1-dev
is available but doesn't help with Tauri 1.Reproduction
Run:
reports:
And
cargo tauri dev
:Workaround
I worked around this by adding the following line to /etc/apt/sources.list:
deb http://gb.archive.ubuntu.com/ubuntu jammy main
Then doing:
IMPORTANT: it was recommended in this comment to undo the change to
sources.list
after installing to prevent problems with dependencies being deleted.Expected behavior
no errors
Full
tauri info
outputStack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: