在 MacOS 中无法使用自制软件找到/安装 ffmpeg 和 nasm

Can not find / install ffmpeg and nasm with homebrew in MacOS

当我尝试使用 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,最近更新了。