-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 / install: error reading from the zlib stream; class=Zlib (5) #10303
Comments
Can you clone |
Yes and yes, that works. Thanks! |
@jguhlin Is this still a problem if you don't use |
@ehuss Wanted to test it, and I'm still having the problem when CARGO_NET_GIT_FETCH_WITH_CLI is turned off. I even did a rustup update to grab all new versions. |
If you'd like to help us debug this, can you try running with the environment variables |
Sure thing. Will throw in the system specs (it's only on two of our servers, not on my workstation or home PC). ❯ cargo --version
cargo 1.59.0 (49d8809dc 2022-02-10)
❯ CARGO_HTTP_DEBUG=true CARGO_LOG=cargo::ops::registry=trace cargo update 2> cargo_update.log
❯ cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.9
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.9"
❯ openssl version
OpenSSL 1.1.1m 14 Dec 2021 |
It looks like you are using a proxy (iaa-proxy.uod.otago.ac.nz), was that intentional? Do you happen to know what software it is running? You can try setting the |
Yeah, the server requires a proxy unforttunately, so I have it set as an environment variable. If I unset the variable I get the same error. Comes up with the same error with just that env variable.
|
``` Updating crates.io index error: failed to get `serde` as a dependency of package `url v2.2.2 (/home/icecold/workspace/rust-url/url)` Caused by: failed to fetch `https://github.com/rust-lang/crates.io-index` Caused by: error reading from the zlib stream; class=Zlib (5) ``` Fixed by `CARGO_NET_GIT_FETCH_WITH_CLI=true cargo build --all-targets` According to rust-lang/cargo#10303
Set `CARGO_NET_GIT_FETCH_WITH_CLI` for rust 1.43.0. New versions do not have the issue and can continue to use libgit2 to fetch the crate index.
Set `CARGO_NET_GIT_FETCH_WITH_CLI` for rust 1.43.0. New versions do not have the issue and can continue to use libgit2 to fetch the crate index.
Set `CARGO_NET_GIT_FETCH_WITH_CLI` for rust 1.43.0. New versions do not have the issue and can continue to use libgit2 to fetch the crate index.
Set `CARGO_NET_GIT_FETCH_WITH_CLI` for rust 1.43.0. New versions do not have the issue and can continue to use libgit2 to fetch the crate index.
Set `CARGO_NET_GIT_FETCH_WITH_CLI` for rust 1.43.0. New versions do not have the issue and can continue to use libgit2 to fetch the crate index.
I ran into this on GitHub actions with 1.45.0. Judging by some folks referencing this issue, that seems to happen on Github actions quite a bit now. |
This issue is resolved for me in the newest cargo (updated today, 9 Sept 2022). Probably was fixed before that, but just adding the date as a point of reference. |
With last update of github seems incompatible with the git version bundled with Rust 1.45. The issue and the workaround are described here: rust-lang/cargo#10303 The root cause seems to be solved by: libgit2/libgit2#5740
This issue has returned for cargo fetching remote git repos in cargo 1.78.0. The same environment fix still works, but no idea why it has returned. I suspect because the OS is older?
|
@jguhlin Would you mind git-bisect it so we can learn what's wrong? |
@weihanglo I'm not sure how to run that in a useful way. It seems to be working on the server again for me, so it could be a strange proxy issue or perhaps they've updated something. |
Problem
Trying to run cargo update for a project or cargo install now produces this error:
Fails on versions:
and
Although I suspect it has to do with the OS. Unfortunately the OS can not be upgraded at this time.
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: