每当我尝试运行brew install <app>
,例如brew install git
,我都会得到以下错误:
$ brew install git
Updating Homebrew...
Warning: You are using macOS 10.10.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this old version.
==> Downloading https://ftp.gnu.org/gnu/gettext/gettext-0.21.tar.xz
Already downloaded: /Users/admin/Library/Caches/Homebrew/downloads/fbd8967fd8256b2e1856b74e8ff0f3d8371cb652c5768e47649613a69d4dc841--gettext-0.21.tar.xz
==> Downloading https://ftp.pcre.org/pub/pcre/pcre2-10.35.tar.bz2
Already downloaded: /Users/admin/Library/Caches/Homebrew/downloads/48997c77a7dae2fb85d52234e92e9032019609e091e23d72529d1e552978a260--pcre2-10.35.tar.bz2
==> Downloading https://mirrors.edge.kernel.org/pub/software/scm/git/git-htmldoc
curl: (60) SSL certificate problem: Invalid certificate chain
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). If the default
bundle file isn't adequate, 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.
Error: Failed to download resource "git--html"
Download failed: https://mirrors.edge.kernel.org/pub/software/scm/git/git-htmldocs-2.28.0.tar.xz
Warning: You are using macOS 10.10.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this old version.
==> Downloading https://ftp.gnu.org/gnu/gettext/gettext-0.21.tar.xz
Already downloaded: /Users/admin/Library/Caches/Homebrew/downloads/fbd8967fd8256b2e1856b74e8ff0f3d8371cb652c5768e47649613a69d4dc841--gettext-0.21.tar.xz
==> Downloading https://ftp.pcre.org/pub/pcre/pcre2-10.35.tar.bz2
Already downloaded: /Users/admin/Library/Caches/Homebrew/downloads/48997c77a7dae2fb85d52234e92e9032019609e091e23d72529d1e552978a260--pcre2-10.35.tar.bz2
==> Downloading https://mirrors.edge.kernel.org/pub/software/scm/git/git-htmldoc
curl: (60) SSL certificate problem: Invalid certificate chain
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). If the default
bundle file isn't adequate, 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.
Error: Failed to download resource "git--html"
Download failed: https://mirrors.edge.kernel.org/pub/software/scm/git/git-htmldocs-2.28.0.tar.xz
字符串
我已经试过this post的答案了,但没有成功。我也不喜欢使用curl的-k或--insecure。
我正在使用
- OSX约塞米蒂10.10.5
- 主页2.4.9
- rvm 1.29.10
- Ruby 2.0.0
**更新:**我尝试卸载并重新安装Homebrew,在重新安装时,我再次收到此消息:
curl: (60) SSL certificate problem: Invalid certificate chain
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). If the default
bundle file isn't adequate, 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.
Error: Failed to download resource "git--html"
Download failed: https://mirrors.edge.kernel.org/pub/software/scm/git/git-htmldocs-2.28.0.tar.xz
型
**更新2:**当我运行brew doctor时,我得到了一个不合理的冗长list of unexpected header files。这些与我的问题有关吗?如果是,删除所有这些的最佳方法是什么?
**更新3:**我最终诉诸于使用curl的-k。唯一的麻烦是,当我这样做时,终端给了我hundreds of lines的似乎是随机字符作为回报。有人知道这是什么吗?不知道该怎么做
**更新4:**不确定这是否相关,但当我尝试安装ruby 2.3时,我得到了这个错误:
Error running '__rvm_make -j4',
please read /Users/admin/.rvm/log/1596996566_ruby-2.3.8/make.log
型
This是日志
4条答案
按热度按时间am46iovg1#
对于任何阅读的人谁尝试了这两个答案都无济于事(像我),我发现了一个解决恼人的
curl (60)
问题的方法。运行以下命令:MacBook:~ leetbacoon$ nano ~/.curlrc
个-k
(我没有.curlrc
文件,所以整个文件只是-k
加上一个换行符)brew install
/upgrade
,它应该从mirrors.edge.kernel.org
或任何其他有SSL证书问题的网站下载默认情况下,
curl
从~/.curlrc
读取配置文件。-k
指示curl
忽略SSL证书问题,这就是我们在这种情况下想要的。我建议之后从配置文件中删除-k
。我的安装程序使用的是El Capitan 10.11.6 / Homebrew 2.5.2 / ruby 2.0.0p648,但没有
rvm
。巧合的是,我也试图安装git
,遇到了这个问题。hof1towb2#
看起来下载器(在这种情况下是curl的一个版本)不信任https://mirrors.edge.kernel.org域上的CA证书。您可以尝试导入此Web服务器提供的CA(取决于您是否真的信任CA)。
要导入证书,您可以下载证书,然后双击证书。MacOS默认情况下会通过Keychain打开它,并询问您是否要导入它。您可以参考official docs。
字符串
注意事项
如果您在任何其他域中遇到此问题,您如何知道从哪里下载证书。
您可以检查服务器颁发的证书以获得上述链接。例如:
型
PS:我不能让我的
-ext
标志在libressl上工作,因此hackygrep
。注意URL。这是您需要信任的证书的位置,以便信任brew安装。此URL可能存在于证书的授权信息访问部分。
42fyovps3#
我在git--html下载时也遇到了一些问题(10.11)。如果你打开finder,点击command + shift + G,输入/usr/local/cellar,你可能会找到你的软件包的文件夹。之后找到bin文件夹,并启动bin文件夹中的可执行文件(它会有终端图标)。What it should look like (bin folder inside 1.3.5 folder)
oxf4rvwz4#
只需在终端导出HOMEBREW_BOTTLE_DOMAIN=https://www.example.com上运行此命令,然后关闭防火墙homebrew.bintray.com/bottles