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

installs failing: error decoding response body #2004

Closed
Munchotaur opened this issue Dec 27, 2024 · 4 comments
Closed

installs failing: error decoding response body #2004

Munchotaur opened this issue Dec 27, 2024 · 4 comments

Comments

@Munchotaur
Copy link

Hi,

Freshly installed Linux MX system here, rust version 1.83.0. When I try to use cargo binstall I see the following errors (verbose version):

 ~ cargo binstall -v --dry-run bat              
DEBUG using (/home/<myusername>/.cargo) as cargo home
DEBUG Using install path: /home/<myusername>/.cargo/bin
 INFO resolve: Resolving package: 'bat'
DEBUG resolve:fetch_crate_matched{crate_name="bat" registry_url=https://index.crates.io/ version_req=*}: Downloading from: 'https://index.crates.io/config.json'
DEBUG resolve:fetch_crate_matched{crate_name="bat" registry_url=https://index.crates.io/ version_req=*}:do_send_request{request=Request { method: GET, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("index.crates.io")), port: None, path: "/config.json", query: None, fragment: None }, headers: {} } url=https://index.crates.io/config.json}:new_resolver: Using system DNS resolver configuration
DEBUG resolve:fetch_crate_matched{crate_name="bat" registry_url=https://index.crates.io/ version_req=*}:do_send_request{request=Request { method: GET, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("index.crates.io")), port: None, path: "/config.json", query: None, fragment: None }, headers: {} } url=https://index.crates.io/config.json}:new_resolver: Resolver configuration complete
DEBUG Failed to retrieve token from `gh auth token` err=Os { code: 2, kind: NotFound, message: "No such file or directory" }
DEBUG Failed to read git credential file
DEBUG get_target_from_rustc()=Some("x86_64-unknown-linux-gnu")
DEBUG Running `/usr/lib64/x86_64-linux-gnu/ld-linux-x86-64.so.2 --version`: err=Os { code: 2, kind: NotFound, message: "No such file or directory" }
DEBUG Running `/lib/ld-linux-x86-64.so.2 --version`: err=Os { code: 2, kind: NotFound, message: "No such file or directory" }
DEBUG `/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 --version`: status=exit status: 0, stdout='ld.so (Debian GLIBC 2.36-9+deb12u9) stable release version 2.36.
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
', stderr=''
DEBUG Running `/lib64/x86_64-linux-gnu/ld-linux-x86-64.so.2 --version`: err=Os { code: 2, kind: NotFound, message: "No such file or directory" }
DEBUG `/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 --version`: status=exit status: 0, stdout='ld.so (Debian GLIBC 2.36-9+deb12u9) stable release version 2.36.
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
', stderr=''
DEBUG `/lib64/ld-linux-x86-64.so.2 --version`: status=exit status: 0, stdout='ld.so (Debian GLIBC 2.36-9+deb12u9) stable release version 2.36.
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
', stderr=''
DEBUG resolve:fetch_crate_matched{crate_name="bat" registry_url=https://index.crates.io/ version_req=*}: Downloading from: 'https://index.crates.io/3/b/bat'
DEBUG run time: 162.854928ms
ERROR Fatal error:

  × For crate bat: Reqwest error: error decoding response body
  ├─▶ Reqwest error: error decoding response body
  ├─▶ error decoding response body
  ╰─▶ there are extra bytes after body has been decompressed

What might be going wrong, or might I be doing wrong?

@NobodyXu
Copy link
Member

Thanks, I got a similar issue in #2003, the issue comes from reqwest 0.12.10 I believe.

If you build cargo-binstall via --locked, or you use the pre-built binary we provide on github, it should work fine.

@Munchotaur
Copy link
Author

Yes, --locked worked perfectly. Thanks for the advice.

@NobodyXu
Copy link
Member

New reqwest version has released 0.12.11 which should fix this

1 similar comment
@NobodyXu

This comment has been minimized.

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

No branches or pull requests

2 participants