Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo update failed on raspberry pi, error inflating zlib stream #8465

Closed
yeshengm opened this issue Jul 8, 2020 · 5 comments
Closed

cargo update failed on raspberry pi, error inflating zlib stream #8465

yeshengm opened this issue Jul 8, 2020 · 5 comments
Labels
C-bug Category: bug

Comments

@yeshengm
Copy link

yeshengm commented Jul 8, 2020

Problem
I have Arch Linux installed on a Raspberry Pi 3b (armv7-unknown-linux-gnueabihf). When I run cargo build, I have the following error:

Caused by:
  failed to load source for dependency `cc`

Caused by:
  Unable to update registry `https://github.com/rust-lang/crates.io-index`

Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  error inflating zlib stream; class=Zlib (5)

Fixes like removing ~/.cargo/registry do not seem to work.

Steps

cargo update

Possible Solution(s)

Notes

Output of cargo version:
cargo 1.45.0-beta (744bd1fbb 2020-06-15)

@yeshengm yeshengm added the C-bug Category: bug label Jul 8, 2020
@alexcrichton
Copy link
Member

Does this persistently happen? If you switch to a different CARGO_HOME temporarily does it still happen? (curious if this is either an intermittent issue or due to a corrupt repository)

@technimad
Copy link

technimad commented Jul 8, 2020

I have the same effects.

For me the problem is not just happening on the rpi, but also during a docker buildx to cross complile for arm/v7.

My exact failed message is:

> [linux/arm/v7 builder 5/6] RUN cargo update:
#21 0.465     Updating crates.io index
#21 0.955 warning: spurious network error (2 tries remaining): could not read directory '/usr/local/cargo/registry/index/github.com-1ecc6299db9ec823/.git//refs': Value too large for defined data type; class=Os (2)
#21 1.333 warning: spurious network error (1 tries remaining): could not read directory '/usr/local/cargo/registry/index/github.com-1ecc6299db9ec823/.git//refs': Value too large for defined data type; class=Os (2)
#21 1.745 error: failed to get `chrono` as a dependency of package `p1reader v0.1.0 (/app)`
#21 1.746 
#21 1.746 Caused by:
#21 1.746   failed to load source for dependency `chrono`
#21 1.746 
#21 1.746 Caused by:
#21 1.746   Unable to update registry `https://github.com/rust-lang/crates.io-index`
#21 1.746 
#21 1.746 Caused by:
#21 1.746   failed to fetch `https://github.com/rust-lang/crates.io-index`
#21 1.746 
#21 1.746 Caused by:
#21 1.746   could not read directory '/usr/local/cargo/registry/index/github.com-1ecc6299db9ec823/.git//refs': Value too large for defined data type; class=Os (2)
------

This is happening in a clean container FROM rust:slim-buster

@alexcrichton
Copy link
Member

@technimad that looks like a separate issue (different error message). If you can provide reproduction steps so we can help debug that it would be very useful!

@technimad
Copy link

@technimad that looks like a separate issue (different error message). If you can provide reproduction steps so we can help debug that it would be very useful!

I'm pretty sure my issue is a duplicate of #7451

@yeshengm
Copy link
Author

yeshengm commented Jul 8, 2020

@alexcrichton This seems to be a transient issue. But I have no idea why it doesn't work before. But anyway it works now! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants