解决Substrate节点模板编译失败ailed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2`
操作系统Linux
(图片来源网络,侵删)
按照 Substrate官网入门教程编译节点模板
cargo build --release
报错
error: failed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2`
root@DESKTOP-8QI2NSA:~/substrate_code/substrate_examples/substrate-node-template# cargo build --release Compiling tikv-jemalloc-sys v0.4.3+5.2.1-patched.2 Compiling substrate-prometheus-endpoint v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling jsonrpc-http-server v18.0.0 Compiling hyper-rustls v0.22.1 Compiling sp-wasm-interface v6.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling node-template-runtime v4.0.0-dev (/root/substrate_code/substrate_examples/substrate-node-template/runtime) Compiling libp2p-wasm-ext v0.30.0 Compiling sc-proposer-metrics v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling libp2p v0.40.0 Compiling sc-rpc-server v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-peerset v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-telemetry v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-runtime-interface v6.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-core v6.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-trie v6.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-keystore v0.12.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-allocator v4.1.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-rpc v6.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-executor-common v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-state-machine v0.12.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-executor-wasmi v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-executor-wasmtime v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-io v6.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-application-crypto v6.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-tasks v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-runtime v6.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-keystore v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) error: failed to run custom build command for `tikv-jemalloc-sys v0.4.3+5.2.1-patched.2`
记录下解决方法
安装cmake
apt install cmake
重新编译项目
cargo build --release
编译成功
root@DESKTOP-8QI2NSA:~/substrate_code/substrate_examples/substrate-node-template# cargo build --release Compiling tikv-jemalloc-sys v0.4.3+5.2.1-patched.2 Compiling sp-version v5.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-inherents v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-staking v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-keyring v6.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-api v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-executor v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-finality-grandpa v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-session v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-offchain v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-transaction-pool v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling frame-system-rpc-runtime-api v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-consensus v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-block-builder v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-timestamp v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-authorship v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-transaction-storage-proof v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-consensus-slots v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-blockchain v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sp-consensus-aura v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-transaction-pool-api v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-client-api v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-block-builder v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-consensus v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-state-db v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-tracing v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-transaction-pool v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-basic-authorship v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-network v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-consensus-slots v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-consensus-aura v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-chain-spec v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-informant v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-offchain v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-network-gossip v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-rpc-api v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-finality-grandpa v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling frame-system v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling frame-benchmarking v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling pallet-transaction-payment v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling pallet-authorship v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling pallet-sudo v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling pallet-randomness-collective-flip v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling frame-executive v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-rpc v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling substrate-frame-rpc-system v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling pallet-transaction-payment-rpc-runtime-api v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling pallet-timestamp v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling pallet-balances v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling pallet-template v4.0.0-dev (/root/substrate_code/substrate_examples/substrate-node-template/pallets/template) Compiling pallet-transaction-payment-rpc v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling pallet-session v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling pallet-aura v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling librocksdb-sys v0.6.1+6.28.2 Compiling pallet-grandpa v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling node-template-runtime v4.0.0-dev (/root/substrate_code/substrate_examples/substrate-node-template/runtime) Compiling rocksdb v0.18.0 Compiling kvdb-rocksdb v0.15.2 Compiling sc-client-db v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-service v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling sc-cli v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.19#174735ea) Compiling node-template v4.0.0-dev (/root/substrate_code/substrate_examples/substrate-node-template/node) Finished release [optimized] target(s) in 3m 37s
文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。