When you edit the Rust “Thebook” second chapter “guess” game Code in VS Code, try adding a rand dependency in cargo. Toml, which is
[dependencies] rand = "0.7.3"
after typing $cargo build on the command line,
Cargo invocation has failed: Error: exit code: 101.
such a popup reminder, prompt crate enable failure.
OUTPUT window prompts as follows:
Running `cargo build --bin=instances --package=instances --message-format=json`... Blocking waiting for file lock on package cache Updating crates.io index warning: spurious network error (2 tries remaining): failed to send request: 操作超时 ; class=Os (2) warning: spurious network error (1 tries remaining): failed to send request: 操作超时 ; class=Os (2) error: failed to get `rand` as a dependency of package `instances v1.46.0 (D:\DataFiles\CodesLearning\RUST\Instances)` Caused by: failed to load source for dependency `rand` Caused by: Unable to update registry `https://github.com/rust-lang/crates.io-index` Caused by: failed to fetch `https://github.com/rust-lang/crates.io-index` Caused by: failed to send request: 操作超时 ; class=Os (2)
it turned out that the connection to Github was timed out. This problem will also be pop-ups for installed updates that are ignored when checking the rust-Analyzer plug-in version every time VS Code is started.
below provides the method to connect to Github. This method also applies to the problem of not being able to connect to Github when a web page is logged on. IP addresses are usually added to the HOSTS file.
host files in C:// Windows/system32/dreivrs/etc directory. You can right click -> Property changes the write permission of User before editing and saving.
can be learned that the current lot by https://github.com.ipaddress.com/www.github.com website IP address has been changed, so a lot of articles referred to in the hosts change have failed. The code added to the hosts file is provided as follows:
#Github 22.214.171.124 github.com
of course, it is more recommended to use the above link to query before making changes, to prevent IP address update invalid. Finally, don’t forget to save the file hosts, , and unwrite User .
- Unable to install SQL Server (setup.exe), VS Shell installation has failed with exit code 1638.
- Rust solves cargo build too slowly
- command/usr/bin/codesign failed with exit code 1- code sign error
- Git did not exit cleanly (exit code 128)
- Command CompileSwift failed with a nonzero exit code
- About Xcode command phasescriptexecution failed with a nonzero exit code solution
- [solution] MAC: stack error: ` gyp ‘failed with exit code:1
- GitHub desktop upload file error commit failed – exit code 1 received
- What about ibtool failed with exit code 255? processing method
- Commit failed – exit code 1 received
- Flutter – iOS: Command /bin/sh failed with exit code 255
- IOS error: linker command failed with exit code 1 solution
- woeusb Installation failed Exit code 256
- Command MergeSwiftModule failed with a nonzero exit code （Xcode12.5.1）
- Command PhaseScriptExecution failed with a nonzero exit code
- com.docker.osx.hyperkit.linux failed to start Exit code 1
- Unable to register the DLL/OCX: RegSvr32 failed with exit code 0x3 My solution
- Command /usr/bin/codesign failed with exit code 1
- Finished with error: Gradle task assembleDebug failed with exit code 1
- clang: error: linker command failed with exit code 1 (use -v to see invocation)