为什么老是编译不成功?求助!!!

以下是我的报错输出,我所有的编译都卡在最后4个进程,比如 n-4/n
我本来是想要学习并使用一个github项目的,地址是GitHub - Eatgrapes/WinIsland · GitHub
error: failed to run custom build command for skia-bindings v0.93.1

Caused by:
process didn't exit successfully: D:\TTTT\winisland\WinIsland-master\target\release\build\skia-bindings-98d6e06995f41b76\build-script-build (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=DOCS_RS
cargo:rerun-if-env-changed=SKIA_DEBUG
cargo:rerun-if-env-changed=SKIA_SOURCE_DIR
cargo:rerun-if-env-changed=FORCE_SKIA_BUILD
cargo:rerun-if-env-changed=FORCE_SKIA_BINARIES_DOWNLOAD
TRYING TO DOWNLOAD AND INSTALL SKIA BINARIES: 0.93.1/319323662b1685a112f5-x86_64-pc-windows-msvc-jpegd-jpege-pdf
cargo:rerun-if-env-changed=SKIA_BINARIES_URL
FROM: https://github.com/rust-skia/skia-binaries/releases/download/0.93.1/skia-binaries-319323662b1685a112f5-x86_64-pc-windows-msvc-jpegd-jpege-pdf.tar.gz
DOWNLOAD AND INSTALL FAILED: curl error code: "56"
curl stderr: "curl: (56) Recv failure: Connection was reset\r\n"
STARTING A FULL BUILD
HOST: x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=CLANGCC
cargo:rerun-if-env-changed=CC
cargo:rerun-if-env-changed=CLANGCXX
cargo:rerun-if-env-changed=CXX
cargo:rerun-if-env-changed=OPT_LEVEL
cargo:rerun-if-env-changed=SKIA_USE_SYSTEM_LIBRARIES
cargo:rerun-if-env-changed=SDKTARGETSYSROOT
cargo:rerun-if-env-changed=SDKROOT
cargo:rerun-if-env-changed=VCINSTALLDIR
cargo:rerun-if-env-changed=LLVM_HOME
cargo:rerun-if-env-changed=USERPROFILE
cargo:rerun-if-env-changed=SKIA_NINJA_COMMAND
cargo:rerun-if-env-changed=SKIA_GN_COMMAND
Probing 'python'
Python 3 found: "python"
Synchronizing Skia dependencies
DOWNLOADING: https://codeload.github.com/rust-skia/skia/tar.gz/m145-0.92.0

--- stderr
Checking for "C:\Program Files\LLVM\bin\clang-cl.exe"

thread 'main' (56596) panicked at C:\Users\23503.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\skia-bindings-0.93.1\build_support\binary_cache\download.rs:81:35:
Failed to download https://codeload.github.com/rust-skia/skia/tar.gz/m145-0.92.0 (curl error code: "18"
curl stderr: "curl: (18) transfer closed with outstanding read data remaining\r\n")
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
(TraeAI-2) D:\TTTT\winisland [0:1] $
(TraeAI-2) D:\TTTT\winisland [0:1] $
(TraeAI-2) D:\TTTT\winisland [0:1] $ trae-sandbox 'Set-Location d:\TTTT\winisland\WinIsland-master; cargo build --release'
Compiling skia-bindings v0.93.1
Building [=======================> ] 302/306: skia-bindings(build)

It fails to download the skia source from github. Assuming you are in China, as I understand it, github is blocked by the great firewall. You may need to use a VPN or something to bypass it. You probably have more experience with that than me though.

It's not, but unless you use something like VPN the connection is usually very unstable

My Solution:

  • cargo clean
  • delete Cargo.lock which in your work dir.
  • try run cargo b