rust-lang / rust-lang/cargo

cargo install fails with SSL_ERROR_SSL in connection to crates.io

Open
#8,339 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-networking C-bug S-triage
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

Problem

Running any cargo command that requires crates.io access (i.e. cargo install cross) fails with the following error on Mac OS Catalina (10.15.4). For example:

Updating crates.io index
warning: spurious network error (2 tries remaining): [35] SSL connect error (LibreSSL SSL_connect: SSL_ERROR_SSL in connection to crates.io:443 )
warning: spurious network error (1 tries remaining): [35] SSL connect error (LibreSSL SSL_connect: SSL_ERROR_SSL in connection to crates.io:443 )
error: failed to download from `https://crates.io/api/v1/crates/cross/0.2.0/download`

Caused by:
  [35] SSL connect error (LibreSSL SSL_connect: SSL_ERROR_SSL in connection to crates.io:443 )

Steps

  1. Install cargo via rustup-init on MacOS 10.15.4
  2. Run cargo install cross or similar

Possible Solution(s)
No possible solutions but I thought it might have had something to do with the fact that the bundled OS X curl is built against LibreSSL so I tried installing curl-openssl via homebrew and running cargo install cross again with no success.

Notes

Output of cargo version:

cargo 1.44.0 (05d080faa 2020-05-06)

Output of otool -L $(which cargo):

/Users/mnbbrown/.cargo/bin/cargo:
	/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 59306.41.2)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1673.126.0)
	/usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 9.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
	/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure on macOS Catalina with cargo 1.44.0 by running cargo install cross, then inspect the reported crates.io SSL error and the otool -L output for the cargo binary. Done means cargo commands requiring crates.io access complete successfully in this environment without the LibreSSL SSL connect error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.