You are not logged in.
i worked on a tauri project, which i initially developed in windows. now i switched to arch linux and i can not build it anymore. i installed all the packages and everything, but i keep to get an error.
the error: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory
i looked it up and i can ensure: it is there.
has anyone of you an idea how i can fix this?
tanks for every hint!
Offline
Start off with the full error, and maybe the command that's throwing the error.
Offline
unfortunately that is the full error. i only erased the path (/home/username/.cargo/bin/cargo-tauri:)
the command that's throwing the error is "cargo tauri build" => as i said, it occurs when i try to build the project
Offline
i looked it up and i can ensure: it is there.
It is *where*? Post actual data for us to comment on. What you might think is obvious or in its proper place may be the actual issue.
Offline
That path is a critical part, though. What does `file /home/username/.cargo/bin/cargo-tauri` show? How about `lddtree /home/username/.cargo/bin/cargo-tauri`?
Last edited by Scimmia (2024-12-25 22:42:11)
Offline
RevOfSpartacus wrote:i looked it up and i can ensure: it is there.
It is *where*? Post actual data for us to comment on. What you might think is obvious or in its proper place may be the actual issue.
thank you for your response. as this is the first time in my life i am writing something in a forum, i might apologize for missing information.
I would like to be able to run and build my project inside of vs code. My project is a tauri app with rust and react. in a new terminal (sh-5.2%) i can't even execute cargo => "cargo tauri build" results in (full response:) sh:cargo: command not found.
so i ran "source ~/.bashrc", because this results in "sh-5.2%" changing to "[Username@pc projectname]$". if i try to run "cargo tauri build" now, i get this (full response:) /home/username/.cargo/bin/cargo-tauri: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory
when i press the run button above my main method in vs code i get this:
* Executing task: cargo run --package projectname --bin projectname
* The terminal process failed to launch: Path to shell executable "cargo" does not exist.
unfortunately i do not have more information, as this is all i get from vs code. if you need something please just tell me how i can get the info and i will provide it.
thank you for your patience
DISCLAMER: as i wrote this endless long summary i solved the build problem by "accident" (outside of vs code, in vs code i still can't do nothing). nevertheless i will document it, because if someone encounters the same issue it might help them.
---------------------------------------------------------------------------------------------------- solved by myself -------------------------------------------------------------------------------------------------------------------------------
here is everything i know and tried regarding my issue (even tho it might be wrong or nonsense):
i tried at first to build my project directly in vs code. as the cargo command could not be found in a freshly opened terminal (sh-5.2%) i did "source ~/.bashrc" so the "sh-5.2$" changed to "[username@pc project]$". now it finds the cargo command but if i run "cargo tauri build" i get this: "/home/username/.cargo/bin/cargo-tauri: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory"
as i could not solve it i tried to navigate to the projectfolder in dolphin: rightclick in it => open terminal here => in this terminal i tried "cargo tauri build" too. here it starts the build process normal until it "crashes" with the following errors:
----------------------------------------------------------- start ------------------------------------------------------------------------------------
The following warnings were emitted during compilation:
warning: javascriptcore-rs-sys@1.1.1:
error: failed to run custom build command for `javascriptcore-rs-sys v1.1.1`
Caused by:
process didn't exit successfully: `/home/username/Documents/programming/Projekte/ntg/src-tauri/target/release/build/javascriptcore-rs-sys-1e4a0aa3721ab896/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=JAVASCRIPTCOREGTK_4.1_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:warning=
pkg-config exited with status code 1
> PKG_CONFIG_PATH=/usr/lib/pkgconfig PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags javascriptcoregtk-4.1 javascriptcoregtk-4.1 >= 2.38
The system library `javascriptcoregtk-4.1` required by crate `javascriptcore-rs-sys` was not found.
The file `javascriptcoregtk-4.1.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
PKG_CONFIG_PATH contains the following:
- /usr/lib/pkgconfig
HINT: you may need to install a package such as javascriptcoregtk-4.1, javascriptcoregtk-4.1-dev or javascriptcoregtk-4.1-devel.
warning: build failed, waiting for other jobs to finish...
The following warnings were emitted during compilation:
warning: webkit2gtk-sys@2.0.1:
error: failed to run custom build command for `webkit2gtk-sys v2.0.1`
Caused by:
process didn't exit successfully: `/home/username/Documents/programming/Projekte/ntg/src-tauri/target/release/build/webkit2gtk-sys-ec392186c372e087/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=WEBKIT2GTK_4.1_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:warning=
pkg-config exited with status code 1
> PKG_CONFIG_PATH=/usr/lib/pkgconfig PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags webkit2gtk-4.1 webkit2gtk-4.1 >= 2.40
The system library `webkit2gtk-4.1` required by crate `webkit2gtk-sys` was not found.
The file `webkit2gtk-4.1.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
PKG_CONFIG_PATH contains the following:
- /usr/lib/pkgconfig
HINT: you may need to install a package such as webkit2gtk-4.1, webkit2gtk-4.1-dev or webkit2gtk-4.1-devel.
Error failed to build app:
------------------------------------------------------------------ End ------------------------------------------------------------------------------------------------------
As far as i can tell i need two things: webkit2gtk-4.1 and javascriptcoregtk-4.1.
I tried installing them by cloning the git repos and installing thunder (because it told me so).
But now as i write this i solved the build issue outside of vs code by trying to run "sudo pacman -S webkit2gtk-4.1". now it works. so the problem was, that i unwillingly installed the wrong webkit2gtk version all the time and tried fixing specific parts of it.
Last edited by RevOfSpartacus (2024-12-26 07:18:29)
Offline
That path is a critical part, though. What does `file /home/username/.cargo/bin/cargo-tauri` show? How about `lddtree /home/username/.cargo/bin/cargo-tauri`?
why is it critical? i never set that path. i just installed vs code with discover (the app installing tool on kde) and all the packages i have with sudo pacman -S packagename.
if i try to run "lddtree /home/username/.cargo/bin/cargo-tauri" it says lddtree: command not found. it neither is a directory, so i unfortunately don't know.
Offline
i just installed vs code with discover
That's very likely the cause of your issues.
KDE Discover (and gnome software and several others) should only be used when a program is not available from archlinux repos or AUR.
Read https://wiki.archlinux.org/title/Visual_Studio_Code and https://wiki.archlinux.org/title/Rust .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline