compiling rustlings error: failed to run custom build command for `onig_sys v69.2.0`

error: failed to run custom build command for `onig_sys v69.2.0`

Caused by:
  process didn't exit successfully: `E:\workspaces\rust_workspace\rustlings\target\debug\build\onig_sys-f46f6441db74487c\build-script-build` (exit code: 101)
--- stdout
cargo:warning=couldn't execute `llvm-config --prefix` (error: The system cannot find the file specified. (os error 2))
cargo:warning=set the LLVM_CONFIG_PATH environment variable to a valid `llvm-config` executable

--- stderr
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: [])"', src\libcore\result.rs:999:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

 

Cargo.toml加一个依赖版本就可以了

[dependencies]
onig = "4.3"

https://lib.rs/crates/onig_sys

 

你可能感兴趣的:(rust)