error: failed to run custom build command for `librocksdb-sys v6.17.3`

rust build时报错提示:

error: failed to run custom build command for `librocksdb-sys v6.17.3`

详细信息:


...

   Compiling ed25519-dalek v1.0.1
   Compiling tracing-subscriber v0.2.17
   Compiling schnorrkel v0.9.1
   Compiling addr2line v0.14.1
   Compiling prost-build v0.7.0
   Compiling mio-uds v0.6.8
error: failed to run custom build command for `librocksdb-sys v6.17.3`

Caused by:
  process didn't exit successfully: `/home/y/IdeaProjects/MinixChain/target/release/build/librocksdb-sys-6de902cd8dc81c39/build-script-build` (exit code: 101)
  --- stderr
  thread 'main' panicked at 'Unable to find libclang: "couldn\'t find any valid shared libraries matching: [\'libclang.so\', \'libclang-*.so\', \'libclang.so.*\', \'libclang-*.so.*\'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"', /home/y/.cargo/registry/src/github.com-1ecc6299db9ec823/bindgen-0.57.0/src/lib.rs:1975:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

解决:

sudo apt install llvm clang

error: failed to run custom build command for `librocksdb-sys v6.17.3`_第1张图片
error: failed to run custom build command for `librocksdb-sys v6.17.3`_第2张图片

相关内容:
error: failed to run custom build command for librocksdb-sys v5.17.2

https://stackoverflow.com/questions/66583720/some-error-failed-to-run-custom-build-command-for-librocksdb-sys-v6-11-4

https://stackoverflow.com/questions/59169661/cant-compile-nearcore-project-after-last-rocksdb-version-bump

你可能感兴趣的:(Rust,substrate,区块链)