范围内的多个适用项目

multiple applicable items in scope

我正在使用 Ubuntu 20.04.2.0-desktop-amd64 , Substrate 3.0.0
版本:

gh@ubuntu:~$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/gh/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.50.0 (cb75ad5db 2021-02-10)

我正在使用“cargo install --force subkey --git https://github.com/paritytech/substrate" 去下载 但是我无法下载子密钥:

Compiling idna v0.1.5
error[E0034]: multiple applicable items in scope
   --> /home/gh/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/field.rs:801:12
    |
801 |                     if M::BITS > T::Mem::BITS {
    |                           ^^^^ multiple `BITS` found
    |
note: candidate #1 is defined in the trait `BitMemory`
   --> /home/gh/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/mem.rs:44:2
    |
44  |     const BITS: u8 = mem::size_of::<Self>() as u8 * 8;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait `IsNumber`
   --> /home/gh/.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
    |
801 |                     if BitMemory::BITS > T::Mem::BITS {
    |                        ^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #2
    |
801 |                     if IsNumber::BITS > T::Mem::BITS {
    |                        ^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /home/gh/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/field.rs:801:19
    |
765 |     fn load_le<M>(&self) -> M
    |                - this type parameter
...
801 |                     if M::BITS > T::Mem::BITS {
    |                                  ^^^^^^^^^^^^ expected type parameter `M`, found `u8`
    |
    = note: expected type parameter `M`
                         found type `u8`

error[E0034]: multiple applicable items in scope
   --> /home/gh/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/field.rs:809:12
    |
809 |                     if M::BITS > T::Mem::BITS - shamt {
    |                           ^^^^ multiple `BITS` found
    |
note: candidate #1 is defined in the trait `BitMemory`
   --> /home/gh/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/mem.rs:44:2
    |
44  |     const BITS: u8 = mem::size_of::<Self>() as u8 * 8;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: candidate #2 is defined in the trait `IsNumber`
   --> /home/gh/.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
    |
809 |                     if BitMemory::BITS > T::Mem::BITS - shamt {
    |                        ^^^^^^^^^^^^^^^
help: disambiguate the associated constant for candidate #2
    |
809 |                     if IsNumber::BITS > T::Mem::BITS - shamt {
    |                        ^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /home/gh/.cargo/registry/src/github.com-1ecc6299db9ec823/bitvec-0.20.1/src/field.rs:809:19
    |
765 |     fn load_le<M>(&self) -> M
    |                - this type parameter
...
809 |                     if M::BITS > T::Mem::BITS - shamt {
    |                                  ^^^^^^^^^^^^^^^^^^^^ expected type parameter `M`, found `u8`
    |
    = note: expected type parameter `M`
                         found type `u8`
...(The same error as above)
error: aborting due to 60 previous errors

Some errors have detailed explanations: E0034, E0308.
For more information about an error, try `rustc --explain E0034`.
error: could not compile `bitvec`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `subkey v2.0.0 (https://github.com/paritytech/substrate#f5d2faf1)`, intermediate artifacts can be found at `/tmp/cargo-installVIcyI0`

Caused by:
  build failed

开始下载时出现如下警告

warning: profile package spec `cranelift-codegen` in profile `dev` did not match any packages
warning: profile package spec `cranelift-wasm` in profile `dev` did not match any packages
warning: profile package spec `libm` in profile `dev` did not match any packages

Did you mean `libc`?
warning: profile package spec `librocksdb-sys` in profile `dev` did not match any packages
warning: profile package spec `nalgebra` in profile `dev` did not match any packages

我试了又试,还是不行

上游护理的临时问题。只是做:

cargo update -p funty --precise "1.1.0"

是否可以使用 repo cargo.lock 进行货物安装:

cargo install --locked --force subkey --git https://github.com/paritytech/substrate