Reputation: 315
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?
Upvotes: 15
Views: 16530
Reputation: 65
So for me what works was:
sudo apt-get update
sudo apt-get install g++
I tried several things but, after downloading g++ on Ubuntu running WSL2 worked for me and I was able to build and run frontier and run with the following commands:
git clone https://github.com/paritytech/frontier/
cd frontier
cargo build --release
./target/debug/frontier-template-node --dev
And to see the blockchain explorer I used this link https://polkadot.js.org/apps/#?rpc=ws://127.0.0.1:9944
Upvotes: 0
Reputation: 844
For me, on intel (x86_64-apple-darwin) MacOS, fix was in uninstalling brew installed llvm.
brew uninstall llvm
and using one installed from Apple's Command line tools.
Upvotes: 0
Reputation: 101
sudo apt-get update
sudo apt install make clang pkg-config libssl-dev
This should do the trick. Reference: https://github.com/paritytech/polkadot/issues/65
Upvotes: 10
Reputation: 21
You need to update the to this version: "6.20.3" checksum = "c309a9d2470844aceb9a4a098cf5286154d20596868b75a6b36357d2bb9ca25d"
am running on M1!
Upvotes: 1
Reputation: 53
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
Upvotes: 1
Reputation: 3169
You need to install additional library:
sudo apt install clang
should help.
Upvotes: 23
Reputation: 1082
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
Upvotes: 1