当我尝试时,$ brew update我得到了错误:
error: Protocol https not supported or disabled in libcurl while accessing https://github.com/mxcl/homebrew/info/refs?service=git-upload-pack
但是,当我$ curl --version,我看到:
curl 7.21.4 (x86_64-apple-darwin12.2.0) libcurl/7.21.4 OpenSSL/0.9.8y zlib/1.2.5 libidn/1.20
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: IDN IPv6 Largefile NTLM SSL libz
除非我错过了什么,否则这对我来说看起来不错。请注意https协议列表中列出的内容。
$ which curl产生可疑的响应:
/usr/local/php5/bin/curl
嗯……也许brew正在使用不同的curl(比如 at 的那个/usr/bin/curl)。让我们来看看:
$ /usr/bin/curl --version
curl 7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y 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
好的,这显然是一个不同的安装curl,但它也在https协议列表中列出,并且那里也有 OpenSSL 信息。
顺便说一句:如果我尝试在我的机器上使用带有任何 repo的httpsURL,我会得到同样的错误。git
问题:
如何确定正在使用的curl路径brew?- 如何启用对
httpsin 的支持libcurl?
更新:我能够通过以下 deltheil 的方法来确定(和)正在使用的libcurl.4.dylib路径git。brew路径是:
/usr/lib/libcurl.4.dylib (compatibility version 6.0.0, current version 6.1.0)
所以我尝试了这个:
$ brew install curl --with-libssh2
幸运的是 curl 在非 SSL URI 上可用,所以它确实安装了。它没有符号链接到/usr/local,但这对我来说很好(我认为)。所以我这样做了:
$ cd /usr/lib
$ mv libcurl.4.dylib libcurl.4.dylib.bk
$ ln -s /usr/local/Cellar/curl/7.30.0/lib/libcurl.4.dylib libcurl.4.dylib
$ brew update
但它仍然给我这个错误:
error: Protocol https not supported or disabled in libcurl while accessing https://github.com/mxcl/homebrew/info/refs?service=git-upload-pack
所以现在问题完全变成了:如何启用对httpsin 的支持libcurl?