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

本文探讨了在Rust项目中遇到的编译错误,特别提到`error:failedtoruncustombuildcommandfor`librocksdb-sysv6.17.3`。解决方案是通过安装LLVM和Clang来修复。同时,文章提及了类似问题的StackOverflow链接,以供读者参考类似错误处理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值