wailsapp / wails

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

libwebkit error on Ubuntu 24.04 #3587

Closed maksemen2 closed 3 days ago

maksemen2 commented 5 days ago

Description

Running "wails dev" causes such error message:

Building application for development...
  • Generating bindings: Done.
  • Compiling application: # github.com/wailsapp/wails/v2/pkg/assetserver/webview
# [pkg-config --cflags  -- gtk+-3.0 gio-unix-2.0 webkit2gtk-4.0 gtk+-3.0 gio-unix-2.0 webkit2gtk-4.0 gtk+-3.0 webkit2gtk-4.0]
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
Package gio-unix-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gio-unix-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gio-unix-2.0' found
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
No package 'webkit2gtk-4.0' found
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
Package gio-unix-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gio-unix-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gio-unix-2.0' found
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
No package 'webkit2gtk-4.0' found
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
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
No package 'webkit2gtk-4.0' found

Build error - exit status 1
No version running, build will be retriggered as soon as changes have been detected

To Reproduce

  1. Run wails dev

Expected behaviour

Everything works fine

Screenshots

No response

Attempted Fixes

No response

System Details

# 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          | AMD Ryzen 5 3600 6-Core Processor                              |
| GPU 1        | Unknown                                                        |
| GPU 2        | GP104 [GeForce GTX 1080] (NVIDIA Corporation) - Driver: nvidia |
| Memory       | 32GB                                                           |
└───────────────────────────────────────────────────────────────────────────────┘

# 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 |
| libwebkit  | libwebkit2gtk-4.0-dev | Installed | 2.36.0-2ubuntu1  |
| npm        | npm                   | Installed | 10.8.1           |
| *nsis      | nsis                  | Installed | v3.09-4          |
| pkg-config | pkg-config            | Installed | 0.29.2           |
└───────────────────── * - Optional Dependency ─────────────────────┘

# Diagnosis
Optional package(s) installation details: 
  - docker: sudo apt install docker.io

 SUCCESS  Your system is ready for Wails development!

Additional context

No response

makew0rld commented 3 days ago

https://wails.io/docs/gettingstarted/building/

If you are using a Linux distribution that does not have webkit2gtk-4.0 (such as Ubuntu 24.04), you will need to add -tags webkit2_41.

maksemen2 commented 3 days ago

https://wails.io/docs/gettingstarted/building/

If you are using a Linux distribution that does not have webkit2gtk-4.0 (such as Ubuntu 24.04), you will need to add -tags webkit2_41.

does this tag work on wails dev command?

makew0rld commented 3 days ago

Yes, try it out and see if it works for you. It should solve your problem.

leaanthony commented 3 days ago

Duplicate #3581