some error failed to run custom build command for `librocksdb-sys v6.11.4`

Viewed 5868

I tried to create my first substrate chain. Create Your First Substrate Chain

But I got some error while compiling substrate.

failed to run custom build command for librocksdb-sys v6.11.4

Does anybody know how to fix this problem?

5 Answers

You need to install additional library:

sudo apt install clang should help.

From @apopiak

Are you on Apple M1? If, so there are currently issues with building rocksdb there. See here an approach: vikiival.medium.com/run-substrate-on-apple-m1-a2699743fae8

Also others have reported needing to:

You need clone the rust-rocksdb repo and checkout the commit listed here: https://github.com/substrate-developer-hub/substrate-node-template/issues/122 then you can create a config.toml file in your .cargo folder in your home directory and add a path to that cloned repo

You had better update cargo to the nightly version and then try it. If it keep in stuck error try comment commands, you may will need to study link.

#rustup component add --toolchain=nightly rust-src rustfmt

rustup target add wasm32-unknown-unknown

#apt-get install llvm clang linux-headers-"$(uname -r)" #

apt install llvm clang
cargo build --release

#cargo fix --allow-dirty #cargo fix --edition

 #lsb_release -a
   No LSB modules are available.
   Distributor ID:  Ubuntu
   Description: Ubuntu 20.04.3 LTS
   Release: 20.04
   Codename:    focal
 #ldconfig --version
   ldconfig (Ubuntu GLIBC 2.31-0ubuntu9.2) 2.31
 #cargo --version
   cargo 1.60.0-nightly (25fcb13 2022-02-01)
 #rustc --version
   rustc 1.60.0-nightly (f624427f8 2022-02-06)
 #rustup show
   Default host: x86_64-unknown-linux-gnu
   rustup home:  /root/.rustup
   installed targets for active toolchain
 --------------------------------------
 wasm32-unknown-unknown
 x86_64-unknown-linux-gnu
 active toolchain
 ----------------
 nightly-x86_64-unknown-linux-gnu (default)
 rustc 1.60.0-nightly (f624427f8 2022-02-06)

#ArmanRiazi.blockchain#Substrate#Dr.GavinWood For details: Walk-Through/Substrate/NodeSetup

You need to update the to this version: "6.20.3" checksum = "c309a9d2470844aceb9a4a098cf5286154d20596868b75a6b36357d2bb9ca25d"

am running on M1!

Related