无法使用YAML功能来制作锈拍
我正在尝试使用拍手的YAML功能构建,但在这里错误。
Compiling clap v3.1.12
Building [========================> ] 44/47: clap, yaml-rust
error: could not compile `clap`
Caused by:
process didn't exit successfully: `rustc --crate-name clap --edition=2018 /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.1.12/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="atty"' --cfg 'feature="color"' --cfg 'feature="default"' --cfg 'feature="std"' --cfg 'feature="strsim"' --cfg 'feature="suggestions"' --cfg 'feature="termcolor"' --cfg 'feature="yaml"' --cfg 'feature="yaml-rust"' -C metadata=c304c427904608a0 -C extra-filename=-c304c427904608a0 --out-dir /home/ubuntu/Fuzzer/fuzzer/target/release/deps -L dependency=/home/ubuntu/Fuzzer/fuzzer/target/release/deps --extern atty=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libatty-a738dbd9b3c63306.rmeta --extern bitflags=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libbitflags-32a2c4a16da85e35.rmeta --extern clap_lex=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libclap_lex-9fd816bdd1aa0a27.rmeta --extern indexmap=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libindexmap-2a2b92386f84cd5f.rmeta --extern strsim=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libstrsim-aa9e0b1c28b1955e.rmeta --extern termcolor=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libtermcolor-d93b521b81ab3f3d.rmeta --extern textwrap=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libtextwrap-455b4f0f719538f2.rmeta --extern yaml_rust=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libyaml_rust-176b9c782134aa71.rmeta --cap-lints allow` (signal: 9, SIGKILL: kill)
请建议
这是我在货物中的依赖性。
[dependencies]
rand = "0.8.4"
libc = "0.2.122"
rand_chacha = "0.3.1"
rand_pcg = "0.3.1"
rayon = "1.5.2"
clap = { version = "3.1.12", features = ["yaml"] }
I am trying to build with the Clap Yaml feature, but it errors out here.
Compiling clap v3.1.12
Building [========================> ] 44/47: clap, yaml-rust
error: could not compile `clap`
Caused by:
process didn't exit successfully: `rustc --crate-name clap --edition=2018 /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.1.12/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="atty"' --cfg 'feature="color"' --cfg 'feature="default"' --cfg 'feature="std"' --cfg 'feature="strsim"' --cfg 'feature="suggestions"' --cfg 'feature="termcolor"' --cfg 'feature="yaml"' --cfg 'feature="yaml-rust"' -C metadata=c304c427904608a0 -C extra-filename=-c304c427904608a0 --out-dir /home/ubuntu/Fuzzer/fuzzer/target/release/deps -L dependency=/home/ubuntu/Fuzzer/fuzzer/target/release/deps --extern atty=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libatty-a738dbd9b3c63306.rmeta --extern bitflags=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libbitflags-32a2c4a16da85e35.rmeta --extern clap_lex=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libclap_lex-9fd816bdd1aa0a27.rmeta --extern indexmap=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libindexmap-2a2b92386f84cd5f.rmeta --extern strsim=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libstrsim-aa9e0b1c28b1955e.rmeta --extern termcolor=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libtermcolor-d93b521b81ab3f3d.rmeta --extern textwrap=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libtextwrap-455b4f0f719538f2.rmeta --extern yaml_rust=/home/ubuntu/Fuzzer/fuzzer/target/release/deps/libyaml_rust-176b9c782134aa71.rmeta --cap-lints allow` (signal: 9, SIGKILL: kill)
Please advise
Here is what my dependencies in the Cargo.toml file look like:
[dependencies]
rand = "0.8.4"
libc = "0.2.122"
rand_chacha = "0.3.1"
rand_pcg = "0.3.1"
rayon = "1.5.2"
clap = { version = "3.1.12", features = ["yaml"] }
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您显示的内容没有错,但是有些东西正在杀死生锈的编译器。
您是在Raspberry Pi或类似计算机上运行,内存非常有限?如果是这样,则可能在编译期间用完了内存,而Linux“ OOM杀手”决定编译器是要停止的失控过程。
您可以通过创建a nofollow noreferrer“> cargo configuration file )这是不是
cargo.toml
)和设置以避免尝试一次编译多个板条箱。如果您还没有设置交换分区,则可能还需要(警告:这可能会迅速磨损SD卡;如果可能的话,请插入SSD或硬盘驱动器)。
There is nothing wrong with what you've shown, but something is killing the Rust compiler.
Are you running on a Raspberry Pi or similar computer with very limited memory? If so, likely you are running out of memory during the compilation, and the Linux “OOM killer” is deciding that the compiler is a runaway process to be stopped.
You can reduce the maximum memory required by creating a Cargo configuration file (this is not
Cargo.toml
) and settingto avoid trying to compile multiple crates at once. Setting up a swap partition, if you do not already have one, may also be necessary (warning: this can wear out SD cards quickly; plug in a SSD or hard drive if possible).