Невозможно установить ничего с помощью brew, ошибка: не удалось загрузить ресурс "git - html" - PullRequest
1 голос
/ 06 августа 2020

Всякий раз, когда я пытаюсь запустить 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

Я пробовал ответы на этот пост и получил не повезло. Я также предпочитаю не использовать curl -k или --insecure

Я использую

  • OSX Yosemite 10.10.5
  • Homebrew 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, я получаю неоправданно длинный список неожиданных файлов заголовков . Это связано с моей проблемой? Если да, то как лучше всего go удалить их все?

Обновление 3: В итоге я прибегнул к использованию команды curl -k. Единственная проблема в том, что когда я это сделал, терминал выдал мне сотни строк того, что кажется случайным символом взамен. Кто-нибудь знает, что это? Не уверен, что здесь делать

Обновление 4: Не уверен, связано ли это, но когда я пытаюсь установить ruby 2.3., Я получаю эту ошибку:

Error running '__rvm_make -j4',
please read /Users/admin/.rvm/log/1596996566_ruby-2.3.8/make.log

Это лог

Ответы [ 2 ]

1 голос
/ 15 августа 2020

Похоже, что загрузчик (в данном случае это версия curl) не доверяет сертификату CA в домене https://mirrors.edge.kernel.org. Вы можете попробовать импортировать ЦС, представленный этим веб-сервером (зависит от того, действительно ли вы доверяете ЦС).

Чтобы импортировать сертификат, вы можете загрузить сертификат и затем дважды щелкнуть по сертификату. MacOS по умолчанию откроет его через Связку ключей и спросит, хотите ли вы импортировать его. Для этого вы можете обратиться к официальным документам .

wget http://crt.sectigo.com/SectigoRSADomainValidationSecureServerCA.crt

Примечание.

Как узнать, откуда скачать сертификат, если вы столкнулись с этой проблемой с любым другим доменом.

Вы можете проверить сертификат, выданный сервером, чтобы получить указанную выше ссылку . например:

$ echo | openssl s_client -connect mirrors.edge.kernel.org:443 2>/dev/null \
  | openssl x509 -noout -text | grep "CA Issuers"

 CA Issuers - URI:http://crt.sectigo.com/SectigoRSADomainValidationSecureServerCA.crt

PS: Я не могу заставить свой -ext флаг работать на libressl, поэтому хакерский grep.

Обратите внимание на URL. Это расположение сертификата, которому вам нужно будет доверять, чтобы доверять установке brew. Этот URL-адрес, скорее всего, присутствует в разделе сертификата Доступ к информации о полномочиях .

0 голосов
/ 12 августа 2020

У меня тоже были проблемы (10.11) с загрузкой git - html. Если вы откроете поисковик, нажмете command + shift + G и наберете / usr / local / cellar, вы, надеюсь, найдете папку с вашим пакетом. После этого найдите папку bin и запустите исполняемый файл внутри папки bin (у него будет значок терминала). Как это должно выглядеть (папка bin внутри папки 1.3.5)

...