I am having the issue that curl is failing to deal with https, and thus I cannot update Homebrew:

brew update && brew upgrade
fatal: unable to access 'https://github.com/Homebrew/homebrew/': Protocol https not supported or disabled in libcurl
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

This is incomprehensible to be, because it has just started happening today. When I run

which curl


/usr/bin/curl --version
curl 7.37.1 (x86_64-apple-darwin14.0) libcurl/7.21.6
Protocols: dict file ftp gopher http imap pop3 smtp telnet tftp
Features: IPv6 Largefile

The HTTPS protocol is clearly missing but I cannot fathom why. This is really puzzling -- what has happened (yesterday I could run brew update && brew upgrade without any errors.

I am on OS X 10.10.2, with the latest XCode and CL tools, and so on and so forth. To the best of my knowledge I have never touched curl or installed something that might have (and the fact that the standard curl is the os supplied version makes things even more strange).


I realised what had happened. I am trying to run BAPS, which requires the Matlab Runtime Compiler, though it is provided with BAPS and an ancillary installation. Once you install the whole lot you need to let BAPS know where the MRC dynamic libraries are, and the 'recommended' method is to set $DYLD_LIBRARY_PATH to:

export DYLD_LIBRARY_PATH='/Applications/MATLAB/MATLAB_Compiler_Runtime/v84/runtime/maci64:/Applications/MATLAB/MATLAB_Compiler_Runtime/v84/sys/os/maci64:/Applications/MATLAB/MATLAB_Compiler_Runtime/v84/bin/maci64'

That put the wrong libcurl in the way and hosed the system. So, lesson learned: figure out how to set the DYLD_LIBRARY_PATH in a smarter way.

  • Could you elaborate on what Matlab Compiler did to override the original apple version of curl? I think I'm having a similar problem, but setting the DYLD_LIBRARY_PATH doesn't do anything for me. – user136155 Jul 13 '15 at 16:52
  • The method to set the DYLD_LIBRARY_PATH recommended is a bad one (stay polite my dear :)). \n They should add either to use this setting in a dedicated subshell to work with BAPS only, \n or a way to define DYLD_LIBRARY_PATH so as to keep all the necessary system library pathes. – dan Aug 13 '15 at 8:31

I had the same problem and removing the following from my ~/.bash_profile fixed it.

export DYLD_LIBRARY_PATH=Applications/MATLAB/MATLAB_Compiler_Runtime/v84/runtime/maci64:/Applications/MATLAB/MATLAB_Compiler_Runtime/v84/sys/os/maci64:/Applications/MATLAB/MATLAB_Compiler_Runtime/v84/bin/maci64:$DYLD_LIBRARY_PATH

Now, curl -V gives

curl 7.37.1 (x86_64-apple-darwin14.0) libcurl/7.37.1 SecureTransport zlib/1.2.5 Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .