did*_*c11 8 linux rust rust-cargo
我正在尝试构建这个程序:https://github.com/elkowar/eww \n但是我没有任何 Rust 知识,我想知道是否有人可以向我解释该构建错误的含义。我安装了 Rust 的 Nightly 版本。
\n以下是构建错误消息:
\nshell # \xe2\x9d\xaf cargo build --release\n Compiling cfg-expr v0.8.0\n Compiling glib-macros v0.14.1\n Compiling atk-sys v0.10.0\n Compiling gdk-pixbuf-sys v0.10.0\n Compiling gio v0.9.1\n Compiling cairo-rs v0.9.1\n Compiling pango v0.9.1\nerror: failed to run custom build command for `atk-sys v0.10.0`\n\nCaused by:\n process didn\'t exit successfully: `/home/$USER/eww/target/release/build/atk-sys-1accfaa96217e653/build-script-build` (exit status: 1)\n --- stdout\n cargo:rerun-if-env-changed=ATK_NO_PKG_CONFIG\n cargo:rerun-if-env-changed=PKG_CONFIG\n cargo:rerun-if-env-changed=ATK_STATIC\n cargo:rerun-if-env-changed=ATK_DYNAMIC\n cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC\n cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC\n cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu\n cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu\n cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH\n cargo:rerun-if-env-changed=PKG_CONFIG_PATH\n cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu\n cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu\n cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR\n cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR\n cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu\n cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu\n cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR\n cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR\n\n --- stderr\n `"pkg-config" "--libs" "--cflags" "atk" "atk >= 2.14"` did not exit successfully: exit status: 1\n --- stderr\n Package atk was not found in the pkg-config search path.\n Perhaps you should add the directory containing `atk.pc\'\n to the PKG_CONFIG_PATH environment variable\n No package \'atk\' found\n Package atk was not found in the pkg-config search path.\n Perhaps you should add the directory containing `atk.pc\'\n to the PKG_CONFIG_PATH environment variable\n No package \'atk\' found\n\nwarning: build failed, waiting for other jobs to finish...\nerror: build failed\nRun Code Online (Sandbox Code Playgroud)\n正如我从这个错误消息中看到的:Package atk was not found in the pkg-config search path.我需要添加它或安装它,但我不知道 PKG_CONFIG_PATH 是什么。
这也是我的系统信息和货物版本:
\n货运:1.55.0-每晚 (cebef2951 2021-07-22)
\n操作系统:Ubuntu 21.04 x86_64
\n内核:5.11.0-25-generic
\n在 Ubuntu 22.10 上,libatk1.0-0单独安装软件包并不能解决这个问题。我们还需要这个librust-atk-dev包裹。
\xe2\x9d\xaf sudo apt-get install librust-atk-dev\nRun Code Online (Sandbox Code Playgroud)\n如果对包名称有任何疑问,最好是使用 apt-cache 搜索它。
\n\xe2\x9d\xaf sudo apt-cache search atk-dev\n \nlibghc-gi-atk-dev - ATK bindings\nlibrust-atk-dev - Rust bindings for the ATK library - Rust source code\nRun Code Online (Sandbox Code Playgroud)\n