The `brew link` step did not complete successfully (ffmpeg)


I am super new to Brew so please bear with me if this is a very basic question. I just installed Brew and the install went without a hitch. Next I tried to install ffmpeg but got this message:

Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/ffmpeg
Target /usr/local/bin/ffmpeg
already exists. You may want to remove it:
rm ‘/usr/local/bin/ffmpeg’

To force the link and overwrite all conflicting files:
brew link --overwrite ffmpeg

To list all files that would be deleted:
brew link --overwrite --dry-run ffmpeg

Possible conflicting files are:

I ran the dry run command, which yielded this:

brew link --overwrite --dry-run ffmpeg
Would remove:

What should I do to fix this? Should I remove the target, force the link or do something else entirely? Once that is done would I need to install ffmpeg again? The command I used to do so initially was:

brew install ffmpeg --with-chromaprint --with-fdk-aac --with-fontconfig --with-freetype --with-frei0r --with-game-music-emu --with-libass --with-libbluray --with-libbs2b --with-libcaca --with-libgsm --with-libmodplug --with-libsoxr --with-libssh --with-libvidstab --with-libvorbis --with-libvpx --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-opus --with-rtmpdump --with-rubberband --with-schroedinger --with-sdl2 --with-snappy --with-speex --with-tesseract --with-theora --with-tools --with-two-lame --with-wavpack --with-webp --with-x265 --with-xz --with-zeromq --with-zimg

Many thanks for your help!

(Joshua McKinney) #2

The formula is installed, but the files are just unlinked and in the Cellar. The last step of the installation process links the files in the Cellar to their usual location ins /usr/local/bin
It looks like you previously installed another version of this to that folder. If you’re happy to overwrite that version, remove the --dry-run flag and things will just work. If you need a copy of the files that would have been overwritten for whatever reason, copy them prior.

(Srvaldez) #3

I had a similar experience on High Sierra, strangely logging out and then logging back in resolved the problem.

(Bert Koenderink) #4

I have installed ffmpeg with Brew, but the files are still in Cellar /usr/local/Cellar/ffmpeg/4.0.1
New to Terminal, so how do I activate this to usr/local/bin ?
And next: how do I link it to FFworks? The files are not visible in the finder so they can’t be dragged into FFworks. I use a MacPro quadcore (early 2008) with El Capitan. Should work fine with 64 bit applications.

FFmpeg in terminal:
ffmpeg version 4.0.1 Copyright © 2000-2018 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-chromaprint --enable-ffplay --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopus --enable-librsvg --enable-librtmp --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libssh --enable-libtesseract --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzmq --enable-opencl --enable-videotoolbox --enable-openssl --enable-lzma --enable-libopenjpeg --disable-decoder=jpeg2000 --extra-cflags=-I/usr/local/Cellar/openjpeg/2.3.0/include/openjpeg-2.3 --enable-nonfree
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…

Use -h to get full help or, even better, run ‘man ffmpeg’

(Sean Molenaar) #5

If ffmpeg installed correctly, it made links from /usr/local/bin to /usr/local/Cellar. Meaning it’s already executable. As for usage with FFworks, I don’t really know. But FFworks seems to have tutorials:

(Bert Koenderink) #6

thanks for your reaction. Did not succeed in linking to FFworks in Homebrew, but I could by downloading a compiled dmg and dragging that into FFworks.