报错信息:
brew install ffmpeg
==> Installing dependencies for ffmpeg: nasm, pkg-config, gettext, texi2html, lame, libogg, libvorbis, libvpx, opus, sdl2, snappy, theora, x264, x265, xvid and xz
==> Installing ffmpeg dependency: nasm
==> Downloading https://homebrew.bintray.com/bottles/na
Already downloaded: /Users/lidi/Library/Caches/Homebrew/downloads/aba39483dea4772cb4795d4f4b38ae52716d33772c969079ebcac1c11c80aebd--nasm-2.13.03.high_sierra.bottle.tar.gz
Error: No such file or directory @ dir_chdir - /usr/local/Cellar
Warning: Bottle installation failed: building from source.
==> Downloading https://www.nasm.us/pub/nasm/releasebui
Already downloaded: /Users/lidi/Library/Caches/Homebrew/downloads/28816079f19ed75d3c9db08761e9637cc93ff22bbd56b4d6d87697b60d4ca4a1--nasm-2.13.03.tar.xz
Error: An exception occurred within a child process:
Errno::EPERM: Operation not permitted @ dir_s_mkdir - /usr/local/Cellar
由于登陆用户不是HomeBrew的安装用户、所以报以上错误这里解决如下:
1.在当前用户重新安装HomeBrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.运行brew install ffmpeg提示成功