macOS brew 镜像源安装 PHP 时,依赖的版本不匹配的解决方法
使用 brew install php
安装 PHP 的过程中,出现问题如下:
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/sqlite-3.35.4.big_sur.bottle.tar.gz
##O#- #
curl: (22) The requested URL returned error: 404
Warning: Bottle missing, falling back to the default domain..
具体的原因是由于镜像源更新 sqlite 的版本到了 3.35.5
版本,却没有保留 3.35.4
版本导致的。进入到 https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/
可以看到此结果,但也无法直接将最新版本改名保存到缓存目录,校验 sha 签名时会报错。
curl -o SHA1_XXXX_3.35.4.big_sur.bottle.tar.gz https://homebrew.bintray.com/bottles/sqlite-3.35.4.big_sur.bottle.tar.gz