[英]some error failed to run custom build command for `librocksdb-sys v6.11.4`
I tried to create my first substrate chain.我试图创建我的第一个衬底链。 Create Your First Substrate Chain
创建你的第一个 Substrate 链
But I got some error while compiling substrate.但是我在编译 substrate 时遇到了一些错误。
failed to run custom build command for librocksdb-sys v6.11.4
无法为
librocksdb-sys v6.11.4
运行自定义构建命令
Does anybody know how to fix this problem?有人知道如何解决这个问题吗?
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
参考: https://github.com/paritytech/polkadot/issues/65
You need to install additional library:您需要安装额外的库:
sudo apt install clang
should help. sudo apt install clang
应该会有所帮助。
You had better update cargo to the nightly version and then try it.你最好把cargo更新到nightly版再试试。 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 组件添加 --toolchain=nightly rust-src rustfmt
rustup target add wasm32-unknown-unknown
#apt-get install llvm clang linux-headers-"$(uname -r)" # #apt-get install llvm clang linux-headers-"$(uname -r)" #
apt install llvm clang
cargo build --release
#cargo fix --allow-dirty #cargo fix --edition #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
#ArmanRiazi.blockchain#Substrate#Dr.GavinWood 有关详细信息: Walk-Through/Substrate/NodeSetup
Are you on Apple M1?
你在苹果 M1 上吗? If, so there are currently issues with building rocksdb there.
如果,那么目前在那里构建 RocksDB 存在问题。 See here an approach: vikiival.medium.com/run-substrate-on-apple-m1-a2699743fae8
在这里查看一种方法: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
您需要克隆 rust-rocksdb 存储库并签出此处列出的提交: https://github.com/substrate-developer-hub/substrate-node-template/issues/122然后您可以在您的.主目录中的 cargo 文件夹,并添加指向该克隆存储库的路径
You need to update the to this version: "6.20.3" checksum = "c309a9d2470844aceb9a4a098cf5286154d20596868b75a6b36357d2bb9ca25d"您需要更新到此版本:“6.20.3”校验和 =“c309a9d2470844aceb9a4a098cf5286154d20596868b75a6b36357d2bb9ca25d”
am running on M1!我在 M1 上运行!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.