Files
doc.rustdesk.com/content/dev/build/faq/_index.en.md
rustdesk 56cfd26e35 seo/geo
2026-03-20 18:42:55 +08:00

3.1 KiB

title, weight, description, keywords
title weight description keywords
FAQ for Windows 40 Troubleshoot common RustDesk build issues on Windows, including vcpkg download failures, missing Cargo.lock packages, VCPKG_ROOT configuration, and LIBCLANG_PATH setup.
rustdesk build faq windows
rustdesk vcpkg error
rustdesk cargo lock error
rustdesk libclang path
rustdesk windows build troubleshooting

Use this FAQ to fix common Windows build errors for RustDesk, especially around vcpkg, Rust dependencies, and clang configuration.

When should you use this Windows build FAQ?

Use this page after your Windows build environment is already set up but cargo run, vcpkg, or bindgen still fails. It covers the most common Windows-side dependency and environment-variable errors in the RustDesk build process.

vcpkg download package failed

Error

 -- Fetching https://chromium.googlesource.com/libyuv/libyuv 287158925b0e03ea4499a18b4e08478c5781541b...
   CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
       Command failed: D:/program/Git/mingw64/bin/git.exe fetch https://chromium.googlesource.com/libyuv/libyuv 287158925b0e03ea4499a18b4e08478c5781541b --depth 1 -n

Solution

Use a browser to download libyuv-287158925b0e03ea4499a18b4e08478c5781541b.tar.gz, then move it into vcpkg/downloads and reinstall.

Package in Cargo.lock not exist

Error

$ cargo run
       Updating git repository `https://github.com/open-trade/confy`
   warning: spurious network error (2 tries remaining): failed to receive response: Operation Timeout
   ; class=Os (2)
   error: failed to get `confy` as a dependency of package `hbb_common v0.1.0 (D:\rustdesk\rustdesk\rustdesk\libs\hbb_common)`

   Caused by:
     failed to load source for dependency `confy`

   Caused by:
     Unable to update https://github.com/open-trade/confy#27fa1294

   Caused by:
     object not found - no match for id (27fa12941291b44ccd856aef4a5452c1eb646047); class=Odb (9); code=NotFound (-3)

Maybe the author used git force push and the previous commit was overwritten.

Solution

cargo update, force the package to be updated.

VCPKG_ROOT not set

Error

thread 'main' panicked at 'Failed to find package: VcpkgNotFound("No vcpkg installation found. Set the VCPKG_ROOT environment variable or run 'vcpkg integrate install'")', libs\scrap\build.rs:7:45

Solution

Add VCPKG_ROOT environment variable, or run with VCPKG_ROOT=<vcpkg_dir> cargo run.

clang not installed, or LIBCLANG_PATH not set

Error

thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['clang.dll', 'libclang.dll'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', C:\Users\selfd\.cargo\registry\src\mirrors.ustc.edu.cn-61ef6e0cd06fb9b8\bindgen-0.59.2\src/lib.rs:2144:31

Solution

Install LLVM, add the LIBCLANG_PATH environment variable as llvm_install_dir/bin.