简体   繁体   English

货物错误:无法为“atk-sys v0.10.0”运行自定义构建命令

[英]Cargo error: failed to run custom build command for `atk-sys v0.10.0`

I am trying to buld this program: https://github.com/elkowar/eww But I don't have any Rust knowledge and I was wondering if someone can explain to me what that build error means.我正在尝试构建这个程序: https://github.com/elkowar/eww但我没有任何 Rust 知识,我想知道是否有人可以向我解释构建错误的含义。 I installed the Nightly version of Rust.我安装了 Rust 的 Nightly 版本。

Here are the build error messages:以下是构建错误消息:

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

As I can see from this error message: Package atk was not found in the pkg-config search path.正如我从这个错误信息中看到的: Package atk was not found in the pkg-config search path. I need to add it or install it, but i don't know what the PKG_CONFIG_PATH is.我需要添加或安装它,但我不知道 PKG_CONFIG_PATH 是什么。


Here is as well my sistem information and version of cargo:这也是我的系统信息和货物版本:

Cargo: 1.55.0-nightly (cebef2951 2021-07-22)货物:1.55.0-每晚(cebef2951 2021-07-22)

OS: Ubuntu 21.04 x86_64操作系统:Ubuntu 21.04 x86_64

Kernel: 5.11.0-25-generic Kernel:5.11.0-25-通用

On Ubuntu 22.10 having libatk1.0-0 package alone does not solve it.在Ubuntu 22.10上单独有libatk1.0-0 package并不能解决。 We also need the librust-atk-dev package.我们还需要librust-atk-dev package。

❯ sudo apt-get install librust-atk-dev

In case of any doubt on the package name, best is to search for it using apt-cache.如果对 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM