lencx / ChatGPT

🔮 ChatGPT Desktop Application (Mac, Windows and Linux)
https://nofwl.com
51.74k stars 5.81k forks source link

[Build Error] Error while building with "yarn build", cargo error #278

Open baillow opened 1 year ago

baillow commented 1 year ago

Error message

(Compiling with "yarn build") ...
Compiling soup2-sys v0.2.0 Compiling glib-sys v0.15.10 Compiling gobject-sys v0.15.10 Compiling gdk-sys v0.15.1 Compiling gio-sys v0.15.10 Compiling atk-sys v0.15.1 Compiling gdk-pixbuf-sys v0.15.10 Compiling gtk-sys v0.15.3 Compiling cairo-sys-rs v0.15.1 Compiling pango-sys v0.15.10 The following warnings were emitted during compilation:

warning: "pkg-config" "--libs" "--cflags" "libsoup-2.4" "libsoup-2.4 >= 2.62" did not exit successfully: exit status: 1

error: failed to run custom build command for soup2-sys v0.2.0

Caused by: process didn't exit successfully: <home folder>/ChatGPT/target/release/build/soup2-sys-a1eedea6792f3e76/build-script-build (exit status: 1) --- stdout cargo:rerun-if-env-changed=LIBSOUP_2.4_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" "--libs" "--cflags" "libsoup-2.4" "libsoup-2.4 >= 2.62" did not exit successfully: exit status: 1 error: could not find system library 'libsoup-2.4' required by the 'soup2-sys' crate

--- stderr Package libsoup-2.4 was not found in the pkg-config search path. Perhaps you should add the directory containing libsoup-2.4.pc' to the PKG_CONFIG_PATH environment variable No package 'libsoup-2.4' found Package libsoup-2.4 was not found in the pkg-config search path. Perhaps you should add the directory containinglibsoup-2.4.pc' to the PKG_CONFIG_PATH environment variable No package 'libsoup-2.4' found

warning: build failed, waiting for other jobs to finish... Error failed to build app: failed to build app error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

OS

Ubuntu 22.04

Environment

cargo 1.67.0 (8ecd4f20a 2023-01-10) rustc 1.67.0 (fc594f156 2023-01-24)

lencx commented 1 year ago

https://tauri.app/v1/guides/getting-started/prerequisites#setting-up-linux

0x32Studio commented 1 year ago

@lencx I have the same issue in aws ec2, libsoup2 is v2.56

0x32Studio commented 1 year ago

@baillow

sudo yum install http://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libsoup-2.62.2-2.el7.x86_64.rpm sudo yum install http://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libsoup-devel-2.62.2-2.el7.x86_64.rpm

lencx commented 1 year ago

@lencx I have the same issue in aws ec2, libsoup2 is v2.56

Did you solve the problem afterwards?

baillow commented 1 year ago

Yes, I use Ubuntu 22.04 and I installed the libsoup2.4-dev package:

sudo apt install libsoup2.4-dev

I did not know that this dependency was not downloaded from Rust.

0x32Studio commented 1 year ago

yes, solve with bellow sudo yum install http://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libsoup-2.62.2-2.el7.x86_64.rpm sudo yum install http://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libsoup-devel-2.62.2-2.el7.x86_64.rpm

KunalSin9h commented 12 months ago

Fixed

Just install webkit2gtk

In arch linux, i have done

sudo pacman -S webkit2gtk
zerodev-exe commented 7 months ago

Fixed

Just install webkit2gtk

In arch linux, i have done

sudo pacman -S webkit2gtk

Thank you so much :)

KekmaTime commented 7 months ago

Fixed

Just install webkit2gtk

In arch linux, i have done

sudo pacman -S webkit2gtk

thanks brother