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

curl: (51) SSL: certificate verification failed (result: 5) #3246

Closed
hackdefendr opened this Issue Sep 30, 2017 · 23 comments

Comments

Projects
None yet
4 participants
@hackdefendr

hackdefendr commented Sep 30, 2017

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

Please always follow these steps:

  • [X ] Confirmed this is a problem with running a brew command and not brew installing or the post-install behaviour of one or more formulae? If it's a formulae-specific problem please file this issue at the relevant tap e.g. for Homebrew/homebrew-core https://github.com/Homebrew/homebrew-core/issues/new
  • [X ] Ran brew update and retried your prior step?
  • [X ] Ran brew doctor, fixed all issues and retried your prior step?
  • [X ] Ran brew config and brew doctor and included their output with your issue?

To help us debug your issue please explain:

  • What you were trying to do (and why)
    brew install vagrant
  • What happened (include command output)
    curl: (51) SSL: certificate verification failed (result: 5)\
  • What you expected to happen
    I expected vagrant to be installed like all my other bottles.
  • Step-by-step reproduction instructions (by running brew commands)
    I have already tried everything from every other mention of this error in legacy-homebrew. Nothing is working now. All brew commands are failing, including brew config.
@MikeMcQuaid

This comment has been minimized.

Member

MikeMcQuaid commented Sep 30, 2017

[X ] Ran brew config and brew doctor and included their output with your issue?

You didn't do this. I'll reopen it when you have.

@hackdefendr

This comment has been minimized.

hackdefendr commented Sep 30, 2017

Like I said...no brew command is working. But since you don't understand that...here:

`$ brew config
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.`

@MikeMcQuaid

This comment has been minimized.

Member

MikeMcQuaid commented Oct 1, 2017

Please just follow the instructions even if they seem stupid to you as they are there for a reason (i.e please show brew doctor too).

What is the output of ‘env | grep-i ssl’? What version of macOS are you running?

@hackdefendr

This comment has been minimized.

hackdefendr commented Oct 1, 2017

`$ brew doctor
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
curl: (51) SSL: certificate verification failed (result: 5)

Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.`

`$ env | grep -i ssl

SSL_CERT_FILE=`

@MikeMcQuaid

This comment has been minimized.

Member

MikeMcQuaid commented Oct 1, 2017

@hackdefendr Try to unset SSL_CERT_FILE and then try again.

What version of macOS are you running?

Still need this information.

@hackdefendr

This comment has been minimized.

hackdefendr commented Oct 1, 2017

Mac OS Sierra 10.12.6

$ brew config
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.

$ brew doctor
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.

$ env | grep -i ssl
$

@MikeMcQuaid

This comment has been minimized.

Member

MikeMcQuaid commented Oct 1, 2017

Those are all after unset SSL_CERT_FILE? What does cat ~/.curlrc output?

@hackdefendr

This comment has been minimized.

hackdefendr commented Oct 1, 2017

Yes after I unset SSL_CERT_FILE.

I have no ~/.curlrc file.

@MikeMcQuaid

This comment has been minimized.

Member

MikeMcQuaid commented Oct 1, 2017

What does which curl and curl --version output?

@hackdefendr

This comment has been minimized.

hackdefendr commented Oct 1, 2017

$ which curl
/usr/bin/curl

$ curl --version
curl 7.54.0 (x86_64-apple-darwin16.0) libcurl/7.54.0 SecureTransport zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets

@MikeMcQuaid

This comment has been minimized.

Member

MikeMcQuaid commented Oct 1, 2017

What country are you in? I'm afraid you're going to have widespread problems if you can't access Bintray over HTTPS with curl and this is something specific to your machine.

@hackdefendr

This comment has been minimized.

hackdefendr commented Oct 1, 2017

United States

Is there anyway to tell curl to use --insecure... adding the -k to it?

Where can I put this to test?

EDIT: Never mind that just downloads a 0 byte file

@ilovezfs

This comment has been minimized.

Contributor

ilovezfs commented Oct 1, 2017

What does

HOMEBREW_ENV_FILTERING=1 brew config

output?

@hackdefendr

This comment has been minimized.

hackdefendr commented Oct 1, 2017

That seems to work...

$ HOMEBREW_ENV_FILTERING=1 brew config
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
HOMEBREW_VERSION: 1.3.4
ORIGIN: https://github.com/Homebrew/brew
HEAD: ac8b585
Last commit: 6 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 6fa1d11
Core tap last commit: 28 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit kabylake
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: 9.0 build 900
Git: 2.13.5 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_144
macOS: 10.12.6-x86_64
Xcode: 9.0
CLT: 9.0.0.0.1.1504363082
X11: N/A

@ilovezfs

This comment has been minimized.

Contributor

ilovezfs commented Oct 1, 2017

🎉

and now in another shell

brew config
@hackdefendr

This comment has been minimized.

hackdefendr commented Oct 1, 2017

From another shell...

$ brew config
HOMEBREW_VERSION: 1.3.4
ORIGIN: https://github.com/Homebrew/brew
HEAD: ac8b585
Last commit: 6 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 2105c57
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit kabylake
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: 9.0 build 900
Git: 2.13.5 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/jsingleton/.rvm/rubies/ruby-2.2.5/bin/ruby
Java: 1.8.0_144
macOS: 10.12.6-x86_64
Xcode: 9.0
CLT: 9.0.0.0.1.1504363082
X11: N/A

@ilovezfs

This comment has been minimized.

Contributor

ilovezfs commented Oct 1, 2017

Looks like you're back in business with the mystery … unsolved.

@hackdefendr

This comment has been minimized.

hackdefendr commented Oct 1, 2017

I agree...and some mysteries are best left unsolved.

Thank-you!

@ilovezfs

This comment has been minimized.

Contributor

ilovezfs commented Oct 1, 2017

you're welcome!

@MikeMcQuaid

This comment has been minimized.

Member

MikeMcQuaid commented Oct 1, 2017

@hackdefendr Would still love to figure out what this is. What about env | grep -i curl?

@hackdefendr

This comment has been minimized.

hackdefendr commented Oct 1, 2017

Oops I forgot I had this one set. Did that as part of troubleshooting.

$ env | grep -i curl
CURL_CA_BUNDLE=/Users/jsingleton/.ssh/cacert.pem
$

I unset this already and tried again. Everything still working.

$ unset CURL_CA_BUNDLE
$ brew doctor
Warning: Calling fails_with :llvm is deprecated!
There is no replacement.
/usr/local/Homebrew/Library/Taps/sidaf/homebrew-pentest/john-jumbo.rb:23:in `class:JohnJumbo'
Please report this to the sidaf/pentest tap!

Warning: Calling fails_with :llvm is deprecated!
There is no replacement.
/usr/local/Homebrew/Library/Taps/sidaf/homebrew-pentest/john-jumbo.rb:23:in `class:JohnJumbo'
Please report this to the sidaf/pentest tap!

Warning: Calling fails_with :llvm is deprecated!
There is no replacement.
/usr/local/Homebrew/Library/Taps/sidaf/homebrew-pentest/john-jumbo.rb:23:in `class:JohnJumbo'
Please report this to the sidaf/pentest tap!

Warning: Calling fails_with :llvm is deprecated!
There is no replacement.
/usr/local/Homebrew/Library/Taps/sidaf/homebrew-pentest/john-jumbo.rb:23:in `class:JohnJumbo'
Please report this to the sidaf/pentest tap!

Your system is ready to brew.

@suratpyari

This comment has been minimized.

suratpyari commented Nov 23, 2017

I am having same issue while installing ruby. Please check my console output

$ rvm install 2.4
Warning, new version of rvm available '1.29.3', you are using older version '1.27.0'.
You can disable this warning with:    echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable  auto-update  with:    echo rvm_autoupdate_flag=2 >> ~/.rvmrc
Unknown ruby string (do not know how to handle): ruby-2.4.
Unknown ruby string (do not know how to handle): ruby-2.4.
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.10/x86_64/ruby-2.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.
Installing requirements for osx.
Updating system.......
Error running 'requirements_osx_brew_update_system ruby-2.4',
showing last 15 lines of /Users/apple/.rvm/log/1511411211_ruby-2.4/update_system.log
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.'
++ rvm_pretty_print stderr
++ case "${rvm_pretty_print_flag:=auto}" in
++ case "${TERM:-dumb}" in
++ case "$1" in
++ [[ -t 2 ]]
++ return 1
++ printf %b 'Failed to update Homebrew, follow instructions here:
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.\n'
Failed to update Homebrew, follow instructions here:
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.
++ return 1
Requirements installation failed with status: 1.
$ brew update
Already up-to-date.
$ env | grep -i curl
$ cat ~/.curlrc
cacert=/etc/ssl/certs/ca-certificates.crt

$ which curl
/opt/local/bin/curl
$ curl --version
curl 7.50.3 (x86_64-apple-darwin14.5.0) libcurl/7.50.3 OpenSSL/1.0.2j zlib/1.2.8
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets 
$ brew config
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.
$ brew doctor
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz

curl: (51) SSL: certificate verification failed (result: 5)
Error: Download failed: https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
Error: Failed to install vendor Ruby.

My OS version is 10.10

@MikeMcQuaid

This comment has been minimized.

Member

MikeMcQuaid commented Nov 23, 2017

@suratpyari Delete your ~/.curlrc

@Homebrew Homebrew locked and limited conversation to collaborators Nov 23, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.