wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
23.3k stars 1.1k forks source link

Ubuntu 24.04 dependency issue (libwebkit) #3581

Open wadert3 opened 5 days ago

wadert3 commented 5 days ago

Description

When running wails dev I ran into this error:

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

Wails doctor returns:

 WARNING  Your system has missing dependencies!
Fatal:
Required dependencies missing: libwebkit
Please read this article on how to resolve this: https://wails.io/guides/resolving-missing-packages

 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

https://wails.io/guides/resolving-missing-packages is also not a valid link

To Reproduce

  1. Run wails dev

Or

  1. Wails doctor:
  2. "Required dependencies missing"

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

Wails Doctor          

# Wails
Version         | v2.9.1
Package Manager | apt   

# System
┌──────────────────────────────────────────────────────────────────────────────────┐
| OS           | Ubuntu                                                            |
| Version      | 24.04                                                             |
| ID           | ubuntu                                                            |
| Go Version   | go1.22.4                                                          |
| Platform     | linux                                                             |
| Architecture | amd64                                                             |
| CPU          | AMD Ryzen 7 5825U with Radeon Graphics                            |
| GPU          | Barcelo (Advanced Micro Devices, Inc. [AMD/ATI]) - Driver: amdgpu |
| Memory       | 23GB                                                              |
└──────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌─────────────────────────────────────────────────────────────┐
| Dependency | Package Name    | Status    | Version          |
| *docker    | docker.io       | Installed | 26.1.4           |
| gcc        | build-essential | Installed | 12.10ubuntu1     |
| libgtk-3   | libgtk-3-dev    | Installed | 3.24.41-4ubuntu1 |
| libwebkit  | Unknown         | Not Found |                  |
| npm        | npm             | Installed | 10.8.1           |
| *nsis      | nsis            | Available | 3.09-4ubuntu1    |
| pkg-config | pkg-config      | Installed | 1.8.1-2build1    |
└────────────────── * - Optional Dependency ──────────────────┘

# Diagnosis
Optional package(s) installation details: 
  - nsis: sudo apt install nsis

 WARNING  Your system has missing dependencies!
Fatal:
Required dependencies missing: libwebkit
Please read this article on how to resolve this: https://wails.io/guides/resolving-missing-packages

 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

Additional context

No response

leaanthony commented 4 days 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.