当我尝试$ brew update
,我发现了错误:如何在libcurl中启用https支持?
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
Hmmmmm ...也许brew
使用不同curl
(如一个在/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的信息也有。
顺便说一句:如果我尝试在我的机器上使用https
URL与任何git
回购,我会得到相同的错误。
问题:
如何确定的路径curl
是brew
使用?- 如何在
libcurl
中启用对https
的支持?
UPDATE:我能够确定libcurl.4.dylib
的路径git
(和brew
)由以下以下deltheil的方法,使用。路径是:
/usr/lib/libcurl.4.dylib (compatibility version 6.0.0, current version 6.1.0)
所以,我想这一点:
$ brew install curl --with-libssh2
幸运的是卷曲可在非SSL URI,所以它实际上没有insstall。它没有符号链接到/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
所以,现在的问题变成独家:如何启用对libcurl
https
支持?
感谢@deltheil,你有我一半。我已经用当前的进度更新了这个问题。 –
因为'git'正确链接到系统libcurl,它支持https,所以肯定有什么问题。这就是说,你应该永远**,永远**修改你的系统文件在'/ usr/bin'下,'/ usr/lib'等等。我建议你运行一个'brew doctor'并检查这个[Github HTTPS克隆错误](https://help.github.com/articles/https-cloning-errors)页面。 – deltheil
或者你可能想通过Homebrew通过'with-brewed-curl'选项来正确安装'git',这样'git'就可以使用brew中的'curl',这取决于'darwinssl'的SSL支持。 – deltheil