我在尝试构建使用此 crate 的项目时遇到问题。
我正在docker rust:1.44.0内部运行。
我已每晚安装一次:
rustup toolchain install nightly
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2020-06-12, rust version 1.46.0-nightly (a37c32e2d 2020-06-11)
info: downloading component 'cargo'
5.0 MiB / 5.0 MiB (100 %) 1.5 MiB/s in 2s ETA: 0s
info: downloading component 'rust-std'
15.9 MiB / 15.9 MiB (100 %) 15.0 MiB/s in 1s ETA: 0s
info: downloading component 'rustc'
47.3 MiB / 47.3 MiB (100 %) 10.9 MiB/s in 5s ETA: 0s
info: installing component 'cargo'
info: installing component 'rust-std'
15.9 MiB / 15.9 MiB (100 %) 9.1 MiB/s in 1s ETA: 0s
info: installing component 'rustc'
47.3 MiB / 47.3 MiB (100 %) 9.9 MiB/s in 4s ETA: 0s
nightly-x86_64-unknown-linux-gnu installed - rustc 1.46.0-nightly (a37c32e2d 2020-06-11)
info: checking for self-updates
现在它给了我:
cargo +nightly test
error: failed to download `dotenv v0.15.0`
Caused by:
unable to get packages from source
Caused by:
failed to parse manifest at `/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/dotenv-0.15.0/Cargo.toml`
Caused by:
readme file with name '../README.md' was not found
我在他们的项目中有一个 Unresolved 问题:
https://github.com/dotenv-rs/dotenv/issues/51
最佳答案
解决此问题的最佳方法是在项目的Cargo.toml中将您对dotenv
的依赖关系更改为此
[dependencies]
dotenv = { version="0.15.0",git="https://github.com/dotenv-rs/dotenv" }
关于rust - 无法构建Dotenv V0.15.0-使用rust 的 cargo ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62336892/