老旧Mac 以 homebrew 安装 ffmpeg 失败的问题及解决

2024-06-05
1分钟阅读时长
479字
阅读

接上回, 作为技术人,我给 老Mac 装个 ffmpeg 是合理的吧

可本应一行命令的事,也是波折不断, 险象环生

只能说, 2024了, 还是 bigSurmac,已无力做 搬砖猿 的工具了

根据 官方机型说明 , 可以确定自己的老伙计上限

问题表现

依赖包 openexr 编译失败

Error: openexr 3.2.4 did not build
Logs:
     ...
Do not report this issue to Homebrew/brew or Homebrew/homebrew-core!


Error: 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.

Do not report this issue: you are running in an unsupported configuration.

排查过程

  1. 从错误提示来看,homebrew 说是 openexr 的问题, 跟自己无关, 还特意强调不要用户提 issure 给自己, 就算提了也会被立即 closed 掉

这态度真够可以的, 对 bigSur 的用户不支持就算了,大不了未来我都手工编译, 我还就喜欢折腾不怕麻烦

  1. 去 openexr 逛了下, 根据 issue 1761issue 1737 的描述, 看起来解决方法在于
  • homebrew 降级到 4.2.x
  • libdeflate 依赖安装

期间,测试了几遍, issue 中提到降到 4.2.18 而我想尽量用更新的, 就对比了几次, 最终选择了最新版 4.2.21

降级 Homebrew 到 4.2.21

cd /usr/local/Homebrew
git checkout 4.2.21

安装 libdeflate 依赖

brew install libdeflate
  1. 重新尝试安装 ffmpeg
brew install ffmpeg

结束手工

Avatar
zfkun 喜欢游戏、热爱技术、追求艺术、崇尚自由、渴望精彩、最爱唠叨