首页 > 解决方案 > 安装子键时出错(Substrate Developer Hub)

问题描述

我是基板和编程的新手,在尝试安装子密钥以为节点生成一些密钥时,我经常遇到同样的错误。我尝试按照 Substrate Developer Hub 中的步骤安装子密钥,但我无法完成安装。错误如下:

error[E0034]: multiple applicable items in scope
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/mem.rs:51:25
|
51 | const MASK: u8 = Self::BITS - 1;
| ^^^^ multiple BITS found
|
note: candidate #1 is defined in the trait BitMemory
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/mem.rs:44:2
|
44 | const BITS: u8 = mem::size_of::() as u8 * 8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait IsNumber
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/funty-1.2.0/src/lib.rs:144:2
|
144 | const BITS: u32;
| ^^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #1
|
51 | const MASK: u8 = BitMemory::BITS - 1;
| ^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #2
|
51 | const MASK: u8 = IsNumber::BITS - 1;
| ^^^^^^^^^^^^^^

error[E0034]: multiple applicable items in scope
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/order.rs:291:15
|
291 | if ct == R::BITS {
| ^^^^ multiple BITS found
|
note: candidate #1 is defined in the trait BitMemory
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/mem.rs:44:2
|
44 | const BITS: u8 = mem::size_of::() as u8 * 8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait IsNumber
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/funty-1.2.0/src/lib.rs:144:2
|
144 | const BITS: u32;
| ^^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #1
|
291 | if ct == BitMemory::BITS {
| ^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #2
|
291 | if ct == IsNumber::BITS {
| ^^^^^^^^^^^^^^

error[E0034]: multiple applicable items in scope
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/order.rs:339:15
|
339 | if ct == R::BITS {
| ^^^^ multiple BITS found
|
note: candidate #1 is defined in the trait BitMemory
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/mem.rs:44:2
|
44 | const BITS: u8 = mem::size_of::() as u8 * 8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait IsNumber
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/funty-1.2.0/src/lib.rs:144:2
|
144 | const BITS: u32;
| ^^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #1
|
339 | if ct == BitMemory::BITS {
| ^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #2
|
339 | if ct == IsNumber::BITS {
| ^^^^^^^^^^^^^^

error[E0034]: multiple applicable items in scope
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/order.rs:450:19
|
450 | for n in 0 .. R::BITS {
| ^^^^ multiple BITS found
|
note: candidate #1 is defined in the trait BitMemory
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/mem.rs:44:2
|
44 | const BITS: u8 = mem::size_of::() as u8 * 8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait IsNumber
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/funty-1.2.0/src/lib.rs:144:2
|
144 | const BITS: u32;
| ^^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #1
|
450 | for n in 0 .. BitMemory::BITS {
| ^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #2
|
450 | for n in 0 .. IsNumber::BITS {
| ^^^^^^^^^^^^^^

error[E0034]: multiple applicable items in scope
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/order.rs:469:21
|
469 | pos.value() < R::BITS,
| ^^^^ multiple BITS found
|
note: candidate #1 is defined in the trait BitMemory
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/mem.rs:44:2
|
44 | const BITS: u8 = mem::size_of::() as u8 * 8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait IsNumber
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/funty-1.2.0/src/lib.rs:144:2
|
144 | const BITS: u32;
| ^^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #1
|
469 | pos.value() < BitMemory::BITS,
| ^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #2
|
469 | pos.value() < IsNumber::BITS,
| ^^^^^^^^^^^^^^

error[E0034]: multiple applicable items in scope
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/order.rs:476:7
|
476 | R::BITS,
| ^^^^ multiple BITS found
|
note: candidate #1 is defined in the trait BitMemory
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/mem.rs:44:2
|
44 | const BITS: u8 = mem::size_of::() as u8 * 8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait IsNumber
--> /home/centifuge/.cargo/registry/src/github.com-1ecc6299db9ec823/funty-1.2.0/src/lib.rs:144:2
|
144 | const BITS: u32;
| ^^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #1
|
476 | BitMemory::BITS,
| ^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #2
|
476 | IsNumber::BITS,
| ^^^^^^^^^^^^^^

error: aborting due to 60 previous errors

部分错误有详细解释:E0034、E0308。有关错误的更多信息,请尝试 rustc --explain E0034。错误:无法编译子密钥 v2.0.0 ( https://github.com/paritytech/substrate#e03ca38d ),中间工件可以在 /tmp/cargo-installkvO14R 找到

原因:无法编译bitvec

标签: linuxsubstrate

解决方案


推荐阅读