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

Fatal error during installation? #1854

Open
mrt181 opened this issue Jul 30, 2024 · 7 comments
Open

Fatal error during installation? #1854

mrt181 opened this issue Jul 30, 2024 · 7 comments

Comments

@mrt181
Copy link

mrt181 commented Jul 30, 2024

I get this error:

curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash                                                                                                                                                                                                                                                                    09:58 
++ mktemp -d
+ cd /tmp/tmp.BsjJTy8fo1
+ base_url=https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-
++ uname -s
+ os=Linux
+ '[' Linux == Darwin ']'
+ '[' Linux == Linux ']'
++ uname -m
+ machine=x86_64
+ '[' x86_64 == armv7l ']'
+ target=x86_64-unknown-linux-musl
+ '[' x86_64 == armv7 ']'
+ url=https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
+ curl -L --proto =https --tlsv1.2 -sSf https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz
+ tar -xvzf -
cargo-binstall
+ ./cargo-binstall -y --force cargo-binstall
ERROR Fatal error:
binstall::download

  × Failed to download from remote: Reqwest error: builder error
  ├─▶ Reqwest error: builder error
  ├─▶ builder error
  ╰─▶ Permission denied (os error 13)
@NobodyXu
Copy link
Member

Can you set environment BINSTALL_LOG_LEVEL=debug and paste the output here please?

@FlorianGD
Copy link

Hello,

First, thank you for the tool, I like it a lot!

I get a similar error with the latest version of binstall. The logs do not provide a lot of information:

cargo binstall procs --log-level debug
DEBUG using (/home/redacted/.cargo) as cargo home
DEBUG Using install path: /home/redacted/.cargo/bin
DEBUG run time: 1.746341ms
ERROR Fatal error:
binstall::download

  × Failed to download from remote: Reqwest error: builder error
  ├─▶ Reqwest error: builder error
  ├─▶ builder error
  ╰─▶ Permission denied (os error 13)cargo binstall -V
1.8.0cargo -V
cargo 1.80.0 (376290515 2024-07-16)

I am on Ubuntu 20.04.

@NobodyXu
Copy link
Member

Thanks, that seems strange...

It seems like we cannot create a reqwest::Client due to permission issue.

I suspect it has problem accessing the system-wide certificate/dns config.

Can you check that your user has permission to access them

@chhe
Copy link

chhe commented Jul 30, 2024

For me it was happening because I had a cert for a custom CA under /usr/local/share/ca-certificates/ that was owned by root but not readable by everyone.

@NobodyXu
Copy link
Member

@mrt181 Can you try using strace to find out which syscalls is causing this failure?

@FlorianGD
Copy link

I had the same fix than @chhe, one certificate in /usr/local/share/ca-certificates/ was not readable by everyone. Once the permission was fixed, cargo binstall worked again.

What is weird is that this certificate was created in 2023, but the error only happened now with the latest version. I do not think the permissions were changed, but I cannot be sure either.

@NobodyXu
Copy link
Member

What is weird is that this certificate was created in 2023, but the error only happened now with the latest version.

Could it be reqwest or rustls changes that caused this?

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

4 participants