【发布时间】:2011-07-03 21:20:29
【问题描述】:
解决方案
我使用 Bruno 的帖子找到了解决方案,但觉得它需要更具体,所以这就是我所做的。
- 已将cacert.pem 下载到我的 ~/.ssh 目录中(我不知道这是否应该去,但我看到有人在尝试寻找解决方案时做了类似的事情,所以我把它放在这里) .
- 为安装设置环境变量 CURL_CA_BUNDLE。这实际上是失败建议的the website 中的解决方案4。我只是误解了他们在说什么(一个简单的例子可能让我避免了几个小时的困惑)。无论如何,你需要指定.pem文件的完整路径,然后你可以像这样安装
$ CURL_CA_BUNDLE=~/.ssh/cacert.pem ruby -e "$(curl -fsSL @987654323@)"然后就可以安装了!
原始问题
我该怎么做
- 安装自制软件,或
- 使用 SSL 安装 curl 以便我可以安装自制软件?
我在 Mac OSX Leopard 上。
我正在尝试install homebrew,但我收到以下错误:
$ ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/Formula/...
/usr/local/Library/Homebrew/...
==> The following directories will be made group writable:
/usr/local/bin
/usr/local/lib
/usr/local/lib/pkgconfig
/usr/local/share/man/man1
/usr/local/share/man/man3
Press enter to continue
==> /usr/bin/sudo /bin/chmod g+w /usr/local/bin /usr/local/lib /usr/local/lib/pkgconfig /usr/local/share/man/man1 /usr/local/share/man/man3
==> Downloading and Installing Homebrew...
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). The default
bundle is named curl-ca-bundle.crt; you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
gzip: stdin: unexpected end of file
/usr/bin/tar: Child returned status 1
/usr/bin/tar: Error exit delayed from previous errors
Failed during: /bin/bash -o pipefail -c '/usr/bin/curl -sSfL https://github.com/mxcl/homebrew/tarball/master | /usr/bin/tar xz -m --strip 1'
我尝试使用 macports 安装 curl 并指定 +ssl,但这不起作用(抱歉,我不记得错误是什么,我花了大约一个小时才到达那个位置,所以我没有想再做一次)。我从 macports 卸载 curl,然后运行 $ whereis curl,但什么也没找到。
所以我转到上面错误消息中建议的the site。大多数选项似乎都不适用,但选项 5 有点道理:
获得更好/不同/更新的 CA 证书包! 一种选择是提取最近 Firefox 浏览器使用的那个 通过在 curl 构建树根中运行“make ca-bundle”
所以我得到curl source code 并运行$ ./buildconf、$ ./configure、$ make、$ make ca-bundle,最后是$ sudo make install。我检查了$ whereis curl,上面写着“/usr/bin/curl”。
但是当我再次运行 homebrew install 命令时(在新的终端窗口中),我得到了上面显示的相同错误。
【问题讨论】: