当我尝试使用 brew 安装 ffmpeg 时,系统会提示我先安装“nasm”公式。但是,当我尝试安装“nasm”公式时,出现以下错误
➜ ~ brew install ffmpeg
Running `brew update --preinstall`...
fatal: Could not resolve HEAD to a revision
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 5 casks.
Warning: No available formula with the name "nasm" (dependency of homebrew-ffmpeg/ffmpeg/ffmpeg).
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
➜ ~ brew install nasm
Warning: No available formula with the name "nasm".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
最佳答案
我想(很久以前)我可能尝试过 brew 来安装 FFmpeg 并卡住了。最后,我手动安装了它:
# 1. Install the zipped executable, or visit https://ffmpeg.org
curl -JL -o ~/Downloads/ffmpeg.zip https://evermeet.cx/ffmpeg/get/zipcurl -JL -o ~/Downloads/ffmpeg.zip https://evermeet.cx/ffmpeg/get/zip
# 2. Inflate/extract executable file
unzip ~/Downloads/ffmpeg.zip -d ~/Downloads/ffmpeg
# 3. Move file into executables directory
cp ~/Downloads/ffmpeg/ffmpeg /usr/local/bin/ffmpeg
# 4. Allow file to execute
chmod +x /usr/local/bin/ffmpeg
# 5. Quick check
file /usr/local/bin/ffmpeg
# /usr/local/bin/ffmpeg: Mach-O 64-bit executable x86_64
# 6. Ready set go!
ffmpeg
资料来源:我为此苦苦挣扎并写了a post on my personal site , 最近更新。
关于ffmpeg - 在 MacOS 中无法使用 homebrew 找到/安装 ffmpeg 和 nasm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70514648/