简体   繁体   English

Rust 编译错误“无法为 `freetype-sys v0.13.1' 运行自定义构建命令”win 10

[英]Rust compilation error " failed to run custom build command for `freetype-sys v0.13.1' " win 10

I am trying to build a Rust program on Windows 10 having a GUI.我正在尝试在具有 GUI 的 Windows 10 上构建一个 Rust 程序。 When trying to compile a Rust file with gtk dependency on Windows 10 I keep getting the following error messages.当尝试编译 Rust 文件时,gtk 依赖于 Windows 10,我不断收到以下错误消息。

warning: unused manifest key: target.i686-pc-windows-msvc.freetype
warning: unused manifest key: target.x86_64-pc-windows-msvc.freetype
   Compiling freetype-sys v0.13.1
   Compiling glib-sys v0.10.0 (https://github.com/gtk-rs/sys#5f35e26c)
error: failed to run custom build command for `freetype-sys v0.13.1`

Caused by:
  process didn't exit successfully: `F:\KA_IdeaProjects\KA_Test_rustIProject2\target\debug\build\freetype-sys-66d9e52815699227\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=FREETYPE2_NO_PKG_CONFIG
  cargo:rerun-if-env-changed=PKG_CONFIG
  cargo:rerun-if-env-changed=FREETYPE2_STATIC
  cargo:rerun-if-env-changed=FREETYPE2_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-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
  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-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
  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-pc-windows-msvc
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
  cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  running: "cmake" "C:\\Users\\3830101\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\freetype-sys-0.13.1\\freetype2" "-G" "Visual Studio 16 2019" "-Thost=x64" "-Ax64" "-DWITH_BZip2=OFF" "-DWITH_HarfBuzz=OFF" "-DWITH_PNG=OFF" "-DWITH_ZLIB=OFF" "-DCMAKE_INSTALL_PREFIX=F:\\KA_IdeaProjects\\KA_Test_rustIProject2\\target\\debug\\build\\freetype-sys-ef0fda53c071f0de\\out" "-DCMAKE_C_FLAGS= -nologo -MD -Brepro" "-DCMAKE_C_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS= -nologo -MD -Brepro" "-DCMAKE_CXX_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS= -nologo -MD -Brepro" "-DCMAKE_ASM_FLAGS_RELEASE= -nologo -MD -Brepro" "-DCMAKE_BUILD_TYPE=Release"

  --- stderr
  thread 'main' panicked at '
  failed to execute command: The system cannot find the file specified. (os error 2)
  is `cmake` not installed?

  build script failed, must exit now', C:\Users\3830101\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.45\src\lib.rs:894:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

How do I fix this error?我该如何解决这个错误?

too, thanks my problem solve with ($ sudo npt install cmake)也感谢我的问题解决了 ($ sudo npt install cmake)

if you use apt as your package manager:如果您使用 apt 作为您的 package 经理:

sudo apt install cmake

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:无法使用 Rust/Anchor 为 `openssl-sys v0.9.72` 运行自定义构建命令 - error: failed to run custom build command for `openssl-sys v0.9.72` using Rust/Anchor 货物错误:无法为“atk-sys v0.10.0”运行自定义构建命令 - Cargo error: failed to run custom build command for `atk-sys v0.10.0` 错误:无法为onig_sys v61.1.0运行自定义生成命令 - error: failed to run custom build command for `onig_sys v61.1.0` 错误:无法为 `gmp-mpfr-sys v1.4.0` 运行自定义构建命令 - Error: Failed to run custom build command for `gmp-mpfr-sys v1.4.0` 错误:无法为 libudev-sys v0.1.4 运行自定义构建命令 - error: failed to run custom build command for `libudev-sys v0.1.4` 一些错误无法为 `librocksdb-sys v6.11.4` 运行自定义构建命令 - some error failed to run custom build command for `librocksdb-sys v6.11.4` ` 错误:无法为 `openssl-sys v0.9.67` 运行自定义构建命令 - ` error: failed to run custom build command for `openssl-sys v0.9.67` 启动 Actix-web 时出错:无法为 `brotli-sys v0.3.2` 运行自定义构建命令 - Error when getting started Actix-web: failed to run custom build command for `brotli-sys v0.3.2` 错误:无法为“ring v0.16.20”运行自定义构建命令 - error: failed to run custom build command for `ring v0.16.20` 错误:无法为 `openssl v0.9.24` 运行自定义构建命令 - error: failed to run custom build command for `openssl v0.9.24`
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM