fatal: unable to access 'https://aomedia.googlesource.com/aom.git/': Failed to connect to aomedia.googlesource.com port 443 after 76077 ms: Couldn't connect to server

 

低版本的Mac 安装PHP就是受罪

复制代码
 brew install shivammathur/php/php@7.4
Warning: You are using macOS 11.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew's GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew's discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.

Warning: shivammathur/php/php@7.4 has been deprecated because it is a versioned formula! It was disabled on 2023-11-28.
==> Fetching dependencies for shivammathur/php/php@7.4: aom, libavif, gd, automake, gmp, krb5, libffi, libpq, libsodium, libzip, oniguruma and tidy-html5
==> Fetching aom
复制代码

 

去这个网站,把对应的版本下载下来:https://aomedia.googlesource.com/aom/+/refs/tags/v3.10.0


复制代码
==> Fetching aom
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/5ca04d553147f6cf1afdd6b553ab71e155889911/Formula/a/a
Already downloaded: /Users/xxx/Library/Caches/Homebrew/downloads/ec676c47aebafccfc1afae4c98ba8659079203918b4bd3f1b7b6374ef2ac12bf--aom.rb
==> Cloning https://aomedia.googlesource.com/aom.git
Cloning into '/Users/xxx/Library/Caches/Homebrew/aom--git'...
fatal: unable to access 'https://aomedia.googlesource.com/aom.git/': Failed to connect to aomedia.googlesource.com port 443 after 76077 ms: Couldn't connect to server
Error: php@7.4: Failed to download resource "aom"
Failure while executing; `/usr/bin/env git clone --branch v3.10.0 --config advice.detachedHead=false --config core.fsmonitor=false https://aomedia.googlesource.com/aom.git /Users/xxx/Library/Caches/Homebrew/aom--git` exited with 128. Here's the output:
Cloning into '/Users/xxx/Library/Caches/Homebrew/aom--git'...
fatal: unable to access 'https://aomedia.googlesource.com/aom.git/': Failed to connect to aomedia.googlesource.com port 443 after 76077 ms: Couldn't connect to server
复制代码

 

模拟  Cloning into '/Users/xxx/Library/Caches/Homebrew/aom--git'...

把源码文件拷贝到 /Users/xxx/Library/Caches/Homebrew/aom--3.10.0
切换到 build 目录下执行(很关键)

cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/aom/3.10.0 ..

  make 
  make install 

 

cmake 不带路径 make install 就默认安装到 ```/usr/local/bin/```

最后看见就表示成功了, /usr/local/Cellar/aom/3.10.0  需要自己手动创建

复制代码
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/Cellar/aom/3.10.0/include/aom/aom.h
-- Installing: /usr/local/Cellar/aom/3.10.0/include/aom/aom_codec.h
-- Installing: /usr/local/Cellar/aom/3.10.0/include/aom/aom_frame_buffer.h
-- Installing: /usr/local/Cellar/aom/3.10.0/include/aom/aom_image.h
-- Installing: /usr/local/Cellar/aom/3.10.0/include/aom/aom_integer.h
-- Installing: /usr/local/Cellar/aom/3.10.0/include/aom/aom_decoder.h
-- Installing: /usr/local/Cellar/aom/3.10.0/include/aom/aomdx.h
-- Installing: /usr/local/Cellar/aom/3.10.0/include/aom/aomcx.h
-- Installing: /usr/local/Cellar/aom/3.10.0/include/aom/aom_encoder.h
-- Installing: /usr/local/Cellar/aom/3.10.0/include/aom/aom_external_partition.h
-- Installing: /usr/local/Cellar/aom/3.10.0/lib/pkgconfig/aom.pc
-- Installing: /usr/local/Cellar/aom/3.10.0/lib/libaom.a
-- Installing: /usr/local/Cellar/aom/3.10.0/bin/aomdec
-- Installing: /usr/local/Cellar/aom/3.10.0/bin/aomenc
复制代码

 

让 brew 识别 aom, 下面根据需要执行

brew link aom
brew unlink aom && brew link aom
brew link --overwrite aom
brew list

 



 

备用:

复制代码
1.重置 brew.git 为官方源:
cd "$(brew --repo)" && git remote set-url origin https://github.com/Homebrew/brew.git
2.重置 homebrew-core.git 为官方源:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" && git remote set-url origin https://github.com/Homebrew/homebrew-core.git
3.重置 homebrew-cask.git 为官方源:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask"
&& git remote set-url origin https://github.com/Homebrew/homebrew-cask
4.zsh 注释掉 HOMEBREW_BOTTLE_DOMAIN 配置,前面加#符号就行
vi ~/.zshrc
# export HOMEBREW_BOTTLE_DOMAIN=xxxxxxxxx
5.修改使其立即生效
source ~/.zshrc
6.刷新源
brew update
复制代码

 

 

 

 

posted @   一杯热水  阅读(426)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
点击右上角即可分享
微信分享提示