When I tried to bump my version of
0.6.1, I started encountering the following error:
error: failed to download `async-std v1.6.2`
unable to get packages from source
failed to unpack package `async-std v1.6.2`
failed to unpack entry at `async-std-1.6.2/CHANGELOG.md`
failed to unpack `/home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/async-std-1.6.2/CHANGELOG.md`
failed to unpack `async-std-1.6.2/CHANGELOG.md` into `/home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/async-std-1.6.2/CHANGELOG.md`
unexpected end of file
Then when I tried reverted the
Cargo.toml entry to downgrade the version back to 0.6.1, the Cargo.lock still retained the 0.6.2 version, even after regenerating it.
I'm not really sure what to do now, and any help would be appreciated! Thanks in advance
You can pin the version in your
async-std = "=1.6.2"
The error is strange, it looks like you might be out of free disk space or something? I don't know what kind of validation cargo does for packages, it might also just be a corrupted archive. You can clear the cargo cache with
rm -rf ~/.cargo/registry/cache/ if necessary.
Clearing the cargo cache solved the problem.
You're right in that I was encountering disk space issues earlier, but after fixing that problem, this cargo issue still persisted.
It would be nice if cargo had a built-in command to clear the cache, but you live and learn! Thanks for the help!
There is a cargo-cache utility. But I agree it would be better if cargo had a built-in way of removing or fixing a broken cache.
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.