[英]Cargo error: failed to run custom build command for `atk-sys v0.10.0`
我正在嘗試構建這個程序: https://github.com/elkowar/eww但我沒有任何 Rust 知識,我想知道是否有人可以向我解釋構建錯誤的含義。 我安裝了 Rust 的 Nightly 版本。
以下是構建錯誤消息:
shell # ❯ cargo build --release
Compiling cfg-expr v0.8.0
Compiling glib-macros v0.14.1
Compiling atk-sys v0.10.0
Compiling gdk-pixbuf-sys v0.10.0
Compiling gio v0.9.1
Compiling cairo-rs v0.9.1
Compiling pango v0.9.1
error: failed to run custom build command for `atk-sys v0.10.0`
Caused by:
process didn't exit successfully: `/home/$USER/eww/target/release/build/atk-sys-1accfaa96217e653/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-env-changed=ATK_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=ATK_STATIC
cargo:rerun-if-env-changed=ATK_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
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
--- stderr
`"pkg-config" "--libs" "--cflags" "atk" "atk >= 2.14"` did not exit successfully: exit status: 1
--- stderr
Package atk was not found in the pkg-config search path.
Perhaps you should add the directory containing `atk.pc'
to the PKG_CONFIG_PATH environment variable
No package 'atk' found
Package atk was not found in the pkg-config search path.
Perhaps you should add the directory containing `atk.pc'
to the PKG_CONFIG_PATH environment variable
No package 'atk' found
warning: build failed, waiting for other jobs to finish...
error: build failed
正如我從這個錯誤信息中看到的: Package atk was not found in the pkg-config search path.
我需要添加或安裝它,但我不知道 PKG_CONFIG_PATH 是什么。
這也是我的系統信息和貨物版本:
貨物:1.55.0-每晚(cebef2951 2021-07-22)
操作系統:Ubuntu 21.04 x86_64
Kernel:5.11.0-25-通用
在Ubuntu 22.10上單獨有libatk1.0-0
package並不能解決。 我們還需要librust-atk-dev
package。
❯ sudo apt-get install librust-atk-dev
如果對 package 名稱有任何疑問,最好使用 apt-cache 進行搜索。
❯ sudo apt-cache search atk-dev
libghc-gi-atk-dev - ATK bindings
librust-atk-dev - Rust bindings for the ATK library - Rust source code
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.