leon3s / wireguard-gui

A wireguard client GUI for Linux made with nextauri
Apache License 2.0
92 stars 6 forks source link

Wont start in Ubuntu 24.04 LTS #140

Open paulhiggs opened 3 months ago

paulhiggs commented 3 months ago

I installed wireguard and wireguard-cli but trying to launch wireguard-cli fails, both in user and administrator modes...

paul@ENVY:~$ wireguard-gui
current: Err(Os { code: 2, kind: NotFound, message: "No such file or directory" })
payload: IpPayload { origin: "188.74.74.72" }
app inited
app state: AppSt(Mutex { data: <locked> })
Gtk-Message: 02:52:08.854: Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.

(wireguard-gui:19106): Gtk-WARNING **: 02:52:08.935: GTK+ module /snap/wireguard-gui/5/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 02:52:08.935: Failed to load module "canberra-gtk-module"

(wireguard-gui:19106): Gtk-WARNING **: 02:52:08.936: GTK+ module /snap/wireguard-gui/5/gnome-platform/usr/lib/gtk-2.0/modules/libcanberra-gtk-module.so cannot be loaded.
GTK+ 2.x symbols detected. Using GTK+ 2.x and GTK+ 3 in the same process is not supported.
Gtk-Message: 02:52:08.936: Failed to load module "canberra-gtk-module"
libEGL fatal: DRI driver not from this Mesa build ('23.2.1-1ubuntu3.1~22.04.2' vs '23.0.4-0ubuntu1~22.04.1')

paul@ENVY:~$ 
paul@ENVY:~$ 
paul@ENVY:~$ 
paul@ENVY:~$ sudo wireguard-gui
mkdir: cannot create directory ‘/run/user/0’: Permission denied
current: Err(Os { code: 2, kind: NotFound, message: "No such file or directory" })
payload: IpPayload { origin: "188.74.74.72" }
app inited
app state: AppSt(Mutex { data: <locked> })
Authorization required, but no authorization protocol specified

(wireguard-gui:19222): Gtk-WARNING **: 02:52:20.063: cannot open display: :0

Am i missing some prerequisite? I dont want to develop or build, just run it

paulhiggs commented 3 months ago

Note that snap install wireguard-gui installs 0.1.1

paul@ENVY:~$ snap install wireguard-gui
wireguard-gui 0.1.1 from leone (leonev) installed

so I downloaded the 0.1.2 package and find a missing dependency libwebkit2gtk-4.0-37

paul@ENVY:~/Downloads$ sudo dpkg -i wireguard-gui_0.1.2_amd64.deb 
Selecting previously unselected package wireguard-gui.
(Reading database ... 172258 files and directories currently installed.)
Preparing to unpack wireguard-gui_0.1.2_amd64.deb ...
Unpacking wireguard-gui (0.1.2) ...
dpkg: dependency problems prevent configuration of wireguard-gui:
 wireguard-gui depends on libwebkit2gtk-4.0-37; however:
  Package libwebkit2gtk-4.0-37 is not installed.

dpkg: error processing package wireguard-gui (--install):
 dependency problems - leaving unconfigured
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1ubuntu3) ...
Processing triggers for desktop-file-utils (0.27-2build1) ...
Errors were encountered while processing:
 wireguard-gui

This is solved by

  1. adding deb http://gb.archive.ubuntu.com/ubuntu jammy main into /etc/apt/sources.list
  2. running sudo apt update
  3. running sudo apt-get install libcanberra-gtk-module libjavascriptcoregtk-4.0-18 libicu70 libwebkit2gtk-4.0-37

Perhaps some information on installing prerequisites (or having them in the install package) should be provided

leon3s commented 3 months ago

Hey thanks for the report, the snap version doesn't work properly currently.

The missing dependencies such as libcanberra-gtk-module libjavascriptcoregtk-4.0-18 libicu70 libwebkit2gtk-4.0-37 is weird i didn't had to install them on a fresh install, i'll add them in the prerequise in the readme

leon3s commented 3 months ago

I have updated the readme, closing this issue.

melroy89 commented 3 months ago

@paulhiggs so the deb file is broken for 24.04 you say? Since I don't have these issues either. However I installed the deb on Linux mint 21.3, which is actually based on a older Ubuntu: Ubuntu 22.04.

Ps. I do expect libwebkit2gtk to be required indeed. But not all listed deps above are required I believe.

Also the build system should have the debs listed in the deb file. However, maybe the deb file is only valid for Ubuntu 22.04.

melroy89 commented 2 months ago

This is the error I see when trying to install the deb:

image

leon3s commented 2 months ago

I guess extending the dependencies will fix that i'll add it in 0.1.4 release

leon3s commented 2 months ago

0.1.4 is release and should fix the problem

melroy89 commented 2 months ago

Well not this deb file installation error:

image

melroy89 commented 2 months ago

So under Ubuntu 24.04 this package is now called: libwebkit2gtk-4.1-0. https://packages.ubuntu.com/noble/libwebkit2gtk-4.1-0

melroy89 commented 2 months ago

So in the package depends for Ubuntu you need to use an "OR" syntax basically like : libwebkit2gtk-4.0-37 | libwebkit2gtk-4.1-0. So on older Ubuntu releases it might need to install and find the 4.0-37 version, while on newer ubuntu releases it's able to find and install 4.1.0 of this package dependency.

I hope that is possible to do that in Nextauri, I use CMake and with CMake I can use this | pipe symbol for this purpose.. Here a real-life example of my WineGUI project: https://gitlab.melroy.org/melroy/winegui/-/blob/main/cmake/packaging.cmake?ref_type=heads#L40

leon3s commented 1 month ago

I doubt this is possible i'll see what i can do

melroy89 commented 1 month ago

See also: https://serverfault.com/questions/1055356/how-to-add-multiple-dependencies-to-debian-package

osering commented 1 month ago

On Lubuntu 24.04.01 v0.1.5 .deb also has unsatisfiable dependencies. instead of libjavascriptcoregtk-4.0-18 needs 4.1-0 or 6.1-0 instead of libicu70, needs 74 instead of libwebkit2gtk-4.0-37 needs 4.1-0 P.S. Appimage functions.

melroy89 commented 1 month ago

On Lubuntu 24.04.01 v0.1.5 .deb also has unsatisfiable dependencies.

Yes well. It's the same issue, since Lubuntu 24.04 is based on Ubuntu 24.04 (Noble Numbat).

cloudy-sfu commented 1 month ago

I'm using Ubuntu 24.04.1 LTS. @osering method works, but the release v0.1.5 stable still sticks on libwebkit2gtk-4.0-37. Even used dpkg -i --force-all to skip, the installed program still cannot run.

melroy89 commented 1 month ago

Even used dpkg -i --force-all to skip, the installed program still cannot run.

Of course that won't fix the issue. Now you need to make sure you manually install all package dependencies. Like libjavascriptcoregtk, libicu and libwebkit2gtk. And most likely more.

leon3s commented 1 month ago

I'll create a build workflow that run on ubuntu 24 to fix this issue