Open wadert3 opened 5 months ago
This should fix it for you: https://wails.io/docs/gettingstarted/building We should probably add a message if we can detect the OS.
I have tried to add flag -tags webkit2_41
to my wails build
multiple times. However, I still did not manage to build the binary. So instead of doing that over and over again. I tried this;
1) Add the previous repo and install the needed webkit. Open your terminal and sudo nano /etc/apt/sources.list.d/ubuntu.sources
2) Add the following lines
Types: deb
URIs: http://br.archive.ubuntu.com/ubuntu/
Suites: jammy noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: jammy-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
3) Update the repo again by sudo apt update
and install the needed dependencies sudo apt install libwebkit2gtk-4.0-dev
4) Now, since this is a dirty hack, you need to reinstate the original PPA list. So just undo step 2, by removing the lines, and save.
# Wails
Version | v2.9.1
Package Manager | apt
# System
┌───────────────────────────────────────────────────────────────────┐
| OS | Ubuntu |
| Version | 24.04 |
| ID | ubuntu |
| Go Version | go1.22.2 |
| Platform | linux |
| Architecture | amd64 |
| CPU | Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz |
| GPU | HD Graphics 620 (Intel Corporation) - Driver: i915 |
| Memory | 15GB |
└───────────────────────────────────────────────────────────────────┘
# Dependencies
┌──────────────────────────────────────────────────────────────────────────┐
| Dependency | Package Name | Status | Version |
| *docker | docker.io | Available | 24.0.7-0ubuntu4 |
| gcc | build-essential | Installed | 13.2.0 |
| libgtk-3 | libgtk-3-dev | Installed | 3.24.41-4ubuntu1.1 |
| libwebkit | libwebkit2gtk-4.0-dev | Installed | 2.44.2-0ubuntu0.22.04.1 |
| npm | npm | Installed | 10.8.2 |
| *nsis | nsis | Available | 3.09-4ubuntu1 |
| pkg-config | pkg-config | Installed | 1.8.1 |
└──────────────────────── * - Optional Dependency ─────────────────────────┘
I have tried to add flag
-tags webkit2_41
to mywails build
multiple times. However, I still did not manage to build the binary. So instead of doing that over and over again. I tried this;1. Add the previous repo and install the needed webkit. Open your terminal and `sudo nano /etc/apt/sources.list.d/ubuntu.sources` 2. Add the following lines
Types: deb URIs: http://br.archive.ubuntu.com/ubuntu/ Suites: jammy noble-updates noble-backports Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg Types: deb URIs: http://security.ubuntu.com/ubuntu/ Suites: jammy-security Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
3. Update the repo again by `sudo apt update` and install the needed dependencies `sudo apt install libwebkit2gtk-4.0-dev` 4. Now, since this is a dirty hack, you need to reinstate the original PPA list. So just undo step 2, by removing the lines, and save.
# Wails Version | v2.9.1 Package Manager | apt # System ┌───────────────────────────────────────────────────────────────────┐ | OS | Ubuntu | | Version | 24.04 | | ID | ubuntu | | Go Version | go1.22.2 | | Platform | linux | | Architecture | amd64 | | CPU | Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz | | GPU | HD Graphics 620 (Intel Corporation) - Driver: i915 | | Memory | 15GB | └───────────────────────────────────────────────────────────────────┘ # Dependencies ┌──────────────────────────────────────────────────────────────────────────┐ | Dependency | Package Name | Status | Version | | *docker | docker.io | Available | 24.0.7-0ubuntu4 | | gcc | build-essential | Installed | 13.2.0 | | libgtk-3 | libgtk-3-dev | Installed | 3.24.41-4ubuntu1.1 | | libwebkit | libwebkit2gtk-4.0-dev | Installed | 2.44.2-0ubuntu0.22.04.1 | | npm | npm | Installed | 10.8.2 | | *nsis | nsis | Available | 3.09-4ubuntu1 | | pkg-config | pkg-config | Installed | 1.8.1 | └──────────────────────── * - Optional Dependency ─────────────────────────┘
This worked perfectly for me on Linux Mint, thank you.
Does the solution mentioned by @leaanthony allow a single binary to use either 2.40 or 2.41? For example, users who are on the latest Ubuntu can run it with 2.41 and other Linux users can run it using 2.40 without having to distribute separate binaries for each.
I have tried to add flag
-tags webkit2_41
to mywails build
multiple times. However, I still did not manage to build the binary. So instead of doing that over and over again. I tried this;1. Add the previous repo and install the needed webkit. Open your terminal and `sudo nano /etc/apt/sources.list.d/ubuntu.sources` 2. Add the following lines
Types: deb URIs: http://br.archive.ubuntu.com/ubuntu/ Suites: jammy noble-updates noble-backports Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg Types: deb URIs: http://security.ubuntu.com/ubuntu/ Suites: jammy-security Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
3. Update the repo again by `sudo apt update` and install the needed dependencies `sudo apt install libwebkit2gtk-4.0-dev` 4. Now, since this is a dirty hack, you need to reinstate the original PPA list. So just undo step 2, by removing the lines, and save.
# Wails Version | v2.9.1 Package Manager | apt # System ┌───────────────────────────────────────────────────────────────────┐ | OS | Ubuntu | | Version | 24.04 | | ID | ubuntu | | Go Version | go1.22.2 | | Platform | linux | | Architecture | amd64 | | CPU | Intel(R) Core(TM) i7-7600U CPU @ 2.80GHz | | GPU | HD Graphics 620 (Intel Corporation) - Driver: i915 | | Memory | 15GB | └───────────────────────────────────────────────────────────────────┘ # Dependencies ┌──────────────────────────────────────────────────────────────────────────┐ | Dependency | Package Name | Status | Version | | *docker | docker.io | Available | 24.0.7-0ubuntu4 | | gcc | build-essential | Installed | 13.2.0 | | libgtk-3 | libgtk-3-dev | Installed | 3.24.41-4ubuntu1.1 | | libwebkit | libwebkit2gtk-4.0-dev | Installed | 2.44.2-0ubuntu0.22.04.1 | | npm | npm | Installed | 10.8.2 | | *nsis | nsis | Available | 3.09-4ubuntu1 | | pkg-config | pkg-config | Installed | 1.8.1 | └──────────────────────── * - Optional Dependency ─────────────────────────┘
Thank you this worked for me on linux mint!
The only thing i did different was I just used sudo nano /etc/apt/sources.list.d/official-package-repositories.list
and then added the following lines:
deb http://br.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://br.archive.ubuntu.com/ubuntu/ noble-updates main restricted universe multiverse
deb http://br.archive.ubuntu.com/ubuntu/ noble-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
Glad it was sorted. Would you be up for creating a PR to update the docs on this? It sure would help a bunch of people.
For other people running into issues running wails dev
with -tags webkit2_41
who encounter the error message AcceleratedSurfaceDMABuf was unable to construct a complete framebuffer
see: https://github.com/tauri-apps/tauri/issues/9304
Would it be possible to drop the webkit2_41
tag and default to using libwebkit2gtk-4.1-dev
or would this somehow cause additional issues?
Not sure how many systems that will break
Yes, I wouldn't want to break support for too many systems.
In my small bit of testing I'm able to run apps built with the webkit2_41
tag on Ubuntu 22.04 and Ubuntu 24.04 provided they have the necessary packages installed. But I'm not knowledgeable enough about the libwebkit2gtk package or Linux OSes to figure out if a reasonable amount of distros would still be supported by defaulting to the webkit2_41
build.
Maybe someone with more Linux experience than me knows if there's a good way to gauge Linux support.
Yeah, ultimately this comes down to a distribution issue. We're addressing this in v3 with support for AppImage and some formats of packages.
Description
When running
wails dev
I ran into this error:Wails doctor returns:
https://wails.io/guides/resolving-missing-packages is also not a valid link
To Reproduce
Or
Expected behaviour
Successful build step or found package installed
Screenshots
No response
Attempted Fixes
webkit2gtk-4.0-dev is installed and reinstalled. Wails has also been installed and reinstalled and computer restarted.
System Details
Additional context
No response