Cargo Installation issues
thanhlecongg opened this issue · comments
Hi,
I'm having installation issues. I was trying to install the package using cargo (both cli app and from source). But I'm getting the errors as follows:
error[E0405]: cannot find trait `CommandFactory` in crate `clap`
--> /Users/thanhdeku/.cargo/registry/src/github.com-1ecc6299db9ec823/omikuji-0.5.0/src/bin/omikuji.rs:9:10
|
9 | #[derive(Parser)]
| ^^^^^^ not found in `clap`
|
= note: this error originates in the derive macro `Parser` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0412]: cannot find type `Command` in crate `clap`
--> /Users/thanhdeku/.cargo/registry/src/github.com-1ecc6299db9ec823/omikuji-0.5.0/src/bin/omikuji.rs:9:10
|
9 | #[derive(Parser)]
| ^^^^^^ not found in `clap`
|
= note: this error originates in the derive macro `Parser` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this struct
|
1 | use std::process::Command;
|
help: if you import `Command`, refer to it directly
|
9 - #[derive(Parser)]
9 + #[derive(Parser)]
|
error[E0433]: failed to resolve: could not find `Command` in `clap`
--> /Users/thanhdeku/.cargo/registry/src/github.com-1ecc6299db9ec823/omikuji-0.5.0/src/bin/omikuji.rs:9:10
|
9 | #[derive(Parser)]
| ^^^^^^ not found in `clap`
|
= note: this error originates in the derive macro `Parser` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this struct
|
1 | use std::process::Command;
|
help: if you import `Command`, refer to it directly
|
9 - #[derive(Parser)]
9 + #[derive(Parser)]
|
error[E0412]: cannot find type `Command` in crate `clap`
--> /Users/thanhdeku/.cargo/registry/src/github.com-1ecc6299db9ec823/omikuji-0.5.0/src/bin/omikuji.rs:29:10
|
29 | #[derive(Args)]
| ^^^^ not found in `clap`
|
= note: this error originates in the derive macro `Args` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this struct
|
1 | use std::process::Command;
|
help: if you import `Command`, refer to it directly
|
29 - #[derive(Args)]
29 + #[derive(Args)]
|
error[E0412]: cannot find type `Command` in crate `clap`
--> /Users/thanhdeku/.cargo/registry/src/github.com-1ecc6299db9ec823/omikuji-0.5.0/src/bin/omikuji.rs:175:10
|
175 | #[derive(Args)]
| ^^^^ not found in `clap`
|
= note: this error originates in the derive macro `Args` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider importing this struct
|
1 | use std::process::Command;
|
help: if you import `Command`, refer to it directly
|
175 - #[derive(Args)]
175 + #[derive(Args)]
|
Some errors have detailed explanations: E0405, E0412, E0433.
For more information about an error, try `rustc --explain E0405`.
error: could not compile `omikuji` due to 5 previous errors
error: failed to compile `omikuji v0.5.0`, intermediate artifacts can be found at `/var/folders/zs/t_2_tn793rggn16t5qrgd6v80000gn/T/cargo-installNWnbDo`
Can you help me to check the issues ? May cargo version is cargo 1.63.0-nightly (39ad1039d 2022-05-25). Many thanks
Good catch! I think it's due to broken upstream dependencies. You should be able to install by adding an --locked
to your cargo install
command. I've also updated the README.