brew报告错误“fatal: unable to access 'https://aomedia.googlesource.com/aom.git/': Failed to connect to aomedia.googlesource.com port 443: Operation timed out”

最近在使用 `brew` 升级应用的时候,报告如下错误:

$ brew upgrade
Warning: You are using macOS 10.11.
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, as you are running this old version.

==> Upgrading 7 outdated packages:
doxygen 1.8.14 -> 1.8.15, ffmpeg 4.0.2 -> 4.1.3, ilmbase 2.2.1 -> 2.3.0, libpng 1.6.36 -> 1.6.37, lz4 1.8.3 -> 1.9.0, opencv 3.4.2 -> 4.1.0_1, openexr 2.2.0_1 -> 2.3.0
==> Upgrading libpng 
==> Downloading https://downloads.sourceforge.net/libpng/libpng-1.6.37.tar.xz
==> Downloading from https://jaist.dl.sourceforge.net/project/libpng/libpng16/1.
######################################################################## 100.0%
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/libpng/1.6.37
==> make
==> make test
==> make install
?  /usr/local/Cellar/libpng/1.6.37: 27 files, 1.2MB, built in 3 minutes 59 seconds
Removing: /usr/local/Cellar/libpng/1.6.36... (28 files, 1.2MB)
Removing: /Users/xxxx/Library/Caches/Homebrew/libpng--1.6.36.tar.xz... (0B)
==> Upgrading ffmpeg 
==> Installing dependencies for ffmpeg: aom, frei0r, libtasn1, nettle, libffi, p11-kit, libevent, unbound, gnutls, fribidi, ninja, meson, glib, pixman, cairo, gobject-introspection, graphite2, harfbuzz, libass, libbluray, libsoxr, opencore-amr, doxygen, little-cms2, openjpeg, rtmpdump, flac, libsndfile, libsamplerate, rubberband, speex, autoconf-archive, giflib, webp, leptonica, tesseract and x265
==> Installing ffmpeg dependency: aom
==> Cloning https://aomedia.googlesource.com/aom.git
Cloning into '/Users/xxxx/Library/Caches/Homebrew/aom--git'...
fatal: unable to access 'https://aomedia.googlesource.com/aom.git/': Failed to connect to aomedia.googlesource.com port 443: Operation timed out
Error: An exception occurred within a child process:
  DownloadError: Failed to download resource "aom"
Failure while executing; `git clone --branch v1.0.0 https://aomedia.googlesource.com/aom.git /Users/xxxx/Library/Caches/Homebrew/aom--git` exited with 128. Here's the output:
Cloning into '/Users/xxxx/Library/Caches/Homebrew/aom--git'...
fatal: unable to access 'https://aomedia.googlesource.com/aom.git/': Failed to connect to aomedia.googlesource.com port 443: Operation timed out

众所周知的原因,很早之前,就已经不能访问 `Google` 的服务器了,因此这个错误是正常现象。

解决方法如下:

$ wget https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/aom.rb

# 用本站提供的一份代码拷贝来替代原来的地址
$ sed -i "" "s/https:\/\/aomedia\.googlesource\.com\/aom\.git/https:\/\/www.mobibrw.com\/wp-content\/uploads\/2019\/04\/aom.zip/g" aom.rb

$ brew uninstall --ignore-dependencies aom

$ brew install --build-from-source aom.rb --env=std

参考链接


发布者

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注