我正在尝试在我的Windows机器上安装货物树。它使用Windows 10,Visual Studio构建工具15.这是我的主动生锈工具链:
active toolchain
----------------
stable-x86_64-pc-windows-msvc (default)
rustc 1.26.0 (a77568041 2018-05-07)
运行cargo install cargo-tree
时,构建失败。构建日志以:
error: failed to run custom build command for `libssh2-sys v0.2.7`
process didn't exit successfully: `C:\Users\NICOLA~1\AppData\Local\Temp\cargo-installt7F5FM\release\build\libssh2-sys-726b9e90a2ed2b95\build-script-build` (exit code: 101)
--- stderr
fatal: not a git repository (or any of the parent directories): .git
thread 'main' panicked at '
couldn't determine visual studio generator
if VisualStudio is installed, however, consider running the appropriate vcvars script before building this crate
', C:\Users\nicolas-delsaux\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.31\src\lib.rs:552:25
note: Run with `RUST_BACKTRACE=1` for a backtrace.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-tree v0.18.0`, intermediate artifacts can be found at `C:\Users\NICOLA~1\AppData\Local\Temp\cargo-installt7F5FM`
根据我在网上找到的一些文档,它似乎与要调用的一些vcvars
脚本以及要安装的旧版Visual Studio相关。我不完全明白该怎么做
答案 0 :(得分:0)
根据@ user25064,这需要通过开发人员命令提示符(更具体地说,是针对您的体系结构的开发人员命令提示符)安装命令