Closed danimesq closed 2 years ago
You need to install the system dependencies listed here.
You need to install the system dependencies listed here.
Have installed libwebkit2gtk-4.0-dev
, build-essential
, curl
, wget
, libssl-dev
, libgtk-3-dev
, libappindicator3-dev
, librsvg2-dev
.
Have NOT installed libappindicator
nor librsvg
as they're marked as optional.
Already have NodeJS installed (although not sure if installed from official NodeJS or from nvm).
Have upgraded my old (but already installed) Rustc and Cargo.
rustc --version
outputs rustc 1.59.0 (9d1b2106e 2022-02-23)
.
npm -v
outputs 7.19.1
.
This isn't a issue in the repo, but in the docs; specifically this part:
sudo apt update && sudo apt install libwebkit2gtk-4.0-dev \ build-essential \ curl \ wget \ libssl-dev \ libgtk-3-dev \ libappindicator3-dev \ librsvg2-dev
I copied it and pasted, but Bash have read only sudo apt update
and the other lines were missed.
libssl-dev
wasn't installed.
libappindicator3-dev
wasn't installed. librsvg2-dev
wasn't installed. (why optional packages were added in the required quote?)
When trying sudo apt install libwebkit2gtk-4.0-dev
, got this output:
Reading package lists... Done Building dependency tree
Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:The following packages have unmet dependencies: libwebkit2gtk-4.0-dev : Depends: libsoup2.4-dev (>= 2.40) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
How to fix the libsoup2.4-dev
issue?
On debian11 the package libappindicator3-dev
cannot be found any more.
We're currently working to expose the Ayatana appindicator in tauri.
@jaques-sam you can add Debian 10 to your source list, see #2647
to fix the libsoup2.4-dev issue try this " sudo apt install libsoup2.4-dev
You need to install the system dependencies listed here.
Did you mean https://tauri.app/v1/guides/getting-started/prerequisites ?
that's the new location of the docs Lucas linked back then, correct.
sudo apt-get install javascriptcoregtk-4.1 libsoup-3.0 webkit2gtk-4.1 -y
It's worked for me
Edit by @FabianLars: These are the requirements for tauri v2! For v1 see the other comments above.
sudo apt-get install javascriptcoregtk-4.1 libsoup-3.0 webkit2gtk-4.1 -y
It's worked for me
Edit by @FabianLars: These are the requirements for tauri v2! For v1 see the other comments above.
It's worked for me
Note on ubuntu (at least, GH Actions' ubuntu-latest
) it's:
Then it still doesn't work because:
error: failed to run custom build command for `gdk-sys v0.18.0`
[...]
--- stderr
`PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" "pkg-config" "--libs" "--cflags" "gdk-3.0" "gdk-3.0 >= 3.22"` did not exit successfully: exit status: 1
error: could not find system library 'gdk-3.0' required by the 'gdk-sys' crate
--- stderr
Package gdk-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gdk-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gdk-3.0' found
Package gdk-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gdk-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gdk-3.0' found
libgdk3.0-cil
doesn't fix it; leaving it there for now.
If you append -0 it will install the runtime package but to build the app you will need the development packages that have the -dev suffix instead of -0.
The lib
in front while technically correct is not reallyyy required since apt-get interprets it as a pattern and will add the lib prefix itself. Same for -dev as long as you do not append the -0.
To be extra clear, the most correct name on ubuntu is libwebkit2gtk-4.1-dev
. This will also include libsoup and libjavascriptcore so in theory you can remove the other 2.
I am using github codspaces that uses Ubuntu 20 LTS for tauri v1 and am getting this error:
@kleenkanteen ➜ /workspaces/speak-together (main) $ sudo apt install libwebkit2gtk-4.1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libwebkit2gtk-4.1-dev
E: Couldn't find any package by glob 'libwebkit2gtk-4.1-dev'
Similar error if I do sudo apt-get install javascriptcoregtk-4.1 libsoup-3.0 webkit2gtk-4.1 -y
:
@kleenkanteen ➜ /workspaces/speak-together (main) $ sudo apt-get install javascriptcoregtk-4.1 libsoup-3.0 webkit2gtk-4.1 -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package javascriptcoregtk-4.1
E: Couldn't find any package by glob 'javascriptcoregtk-4.1'
E: Couldn't find any package by regex 'javascriptcoregtk-4.1'
E: Unable to locate package libsoup-3.0
E: Couldn't find any package by glob 'libsoup-3.0'
E: Couldn't find any package by regex 'libsoup-3.0'
E: Unable to locate package webkit2gtk-4.1
E: Couldn't find any package by glob 'webkit2gtk-4.1'
E: Couldn't find any package by regex 'webkit2gtk-4.1'
I did sudo apt update
and sudo apt update
before all this.
Any ideas? What a pain
If you want to develop for tauri v1 (which you said) then you want to install webkitgtk 4.0 not 4.1
If you want to develop for v2 then you need Ubuntu 22.04 or above for 4.1
That fixed the erorr, I installed webgitktk 4 with sudo apt install libwebkit2gtk-4.0-dev
.
Now I get the error (speak-together:28859): Gtk-WARNING **: 19:14:44.440: cannot open display:
. I think since I am connected over ssh. I tried following https://stackoverflow.com/questions/76961661/how-to-open-the-tauri-application-located-on-the-server, no banana.
Is it feasible to do tauri developement over ssh?
If you meet this in Ubuntu24, unfortunately, it does not have the libwebkit2gtk-4.0-dev package yet, see this link in the official repository. ubuntu official package search I haven't found a solution yet and gave up on tauri for now.
Workaround in this issue tauri-apps/tauri#9662
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:
sudo apt update sudo apt install libwebkit2gtk-4.0-dev
IMPORTANT: it was recommended in this https://github.com/tauri-apps/tauri/issues/9662#issuecomment-2133959550 to undo the change to sources.list after installing to prevent problems with dependencies being deleted.
Describe the bug
Output:
Even more details:
Reproduction
No response
Expected behavior
No response
Platform and versions
Stack trace
No response
Additional context
No response