最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】Mac中brew reinstall ffmpeg出错:Error: Calling keg_only :provided_pre_mountain_lion is disabled! There is no replacement

brew crifan 1828浏览 0评论
折腾:
【未解决】Mac中尝试给mp4内嵌字幕出错:AVFilterGraph No such filter ass
用brew重新安装ffmpeg出错:
➜  ffmpeg_edit_subtitle brew reinstall ffmpeg \
    --with-tools \
    --with-fdk-aac \
    --with-freetype \
    --with-fontconfig \
    --with-libass \
    --with-libvorbis \
    --with-libvpx \
    --with-opus \
    --with-x265
==> Reinstalling ffmpeg --with-fdk-aac --with-libass --with-tools --with-x265 --with-fontconfig --with-freetype --with-libvorbis --with-libvpx --with-
==> Installing dependencies for ffmpeg: nasm, texi2html, fdk-aac, libpng, freetype, fontconfig, fribidi, libffi, glib, pixman, cairo, gobject-introspection, graphite2, harfbuzz, libass, libogg, libvorbis, libvpx, opus and x265
==> Installing ffmpeg dependency: nasm
==> Downloading 
https://homebrew.bintray.com/bottles/nasm-2.13.03.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring nasm-2.13.03.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/nasm/2.13.03: 30 files, 2.6MB
Error: Calling keg_only :provided_pre_mountain_lion is disabled! There is no replacement.
报错:
Error: Calling keg_only :provided_pre_mountain_lion is disabled! There is no replacement
关于使用Homebrew下载PostGIS时的报错 – SegmentFault 思否
Brew Doctor Error – Calling keg_only :provided_by_osx is disabled! · Issue #4093 · Homebrew/brew
自己先去试试:
brew update && brew upgrade ffmpeg
再说
结果出错:
➜  ffmpeg_edit_subtitle brew update && brew upgrade ffmpeg
error: Unable to get pack file 
https://mirrors.ustc.edu.cn/homebrew-core.git/objects/pack/pack-44d56cf1ef2e8df492f92bfc83233d3230810607.pack
transfer closed with 166942842 bytes remaining to read
error: Unable to find 6ada89e003411006ee467eb764cc32f96aa3c924 under 
https://mirrors.ustc.edu.cn/homebrew-core.git
Cannot obtain needed object 6ada89e003411006ee467eb764cc32f96aa3c924
error: fetch failed.
Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
再试一次:
➜  ffmpeg_edit_subtitle brew update && brew upgrade ffmpeg
Updated 1 tap (homebrew/core).
==> New Formulae
amtk                                    fortio                                  luit                                    range-v3
。。。
fork-cleaner                            luarocks                                qsoas
==> Updated Formulae
carthage ✔                      docfx                           htop                            mongo-cxx-driver                rtf2latex2e
cloc ✔                          docker                          htslib                          mongo-orchestration             rtv
ffmpeg ✔                        docker-completion               http-parser                     [email protected]                     rubberband
flow ✔                          docker-compose                  httpd                           [email protected]                     ruby
gdbm ✔                          docker-compose-completion       httpie                          mongoose                        ruby-build
icu4c ✔                         docker-credential-helper        hub                             monit                           ruby-install
libidn2 ✔                       docker-machine                  hugo                            mono                            [email protected]
libunistring ✔                  docker-machine-completion       hwloc                           mosh                            [email protected]
lrzsz ✔                         docker-machine-nfs              hydra                           mosquitto                       rust
mongodb ✔                       docker-squash                   hyperscan                       mp3gain                         rustup-init
node ✔                          docker-swarm                    hypre                           mpc                             s-nail
openssl ✔                       docker2aci                      i2p                             mpd                             s3-backer
python ✔                        dockviz                         iamy                            mpfi                            s3cmd
readline ✔                      doctl                           icarus-verilog                  mpich                           s3fs
redis ✔                         docutils                        icdiff                          mpop                            s6
solr ✔                          doitlive                        ice                             mps-youtube                     sagittarius-scheme
sqlite ✔                        dosbox                          idris                           mpv                             saldl
telnet ✔                        double-conversion               igv                             mpw                             samtools
watchman ✔                      dovecot                         ii                              mr                              sane-backends
wget ✔                          draco                           ilmbase                         mrboom                          saxon
xz ✔                            dropbear                        imagemagick                     mrtg                            sbcl
abcde                           druid                           imagemagick@6                   mruby                           sbt
abcl                            dscanner                        imake                           mscgen                          [email protected]
abcm2ps                         dspdfviewer                     imapsync                        msgpack                         sbtenv
abcmidi                         dtc                             imlib2                          msitools                        scala
abnfgen                         dub                             immortal                        mujs                            [email protected]
abyss                           duck                            inetutils                       multimarkdown                   scalapack
。。。
dnscrypt-proxy                  hss                             monero                          rst-lint
dnsdist                         html-xml-utils                  monetdb                         rsyslog
dnstwist                        htmldoc                         mongo-c-driver                  rtags
==> Renamed Formulae
cdiff -> ydiff                          latexila -> gnome-latex                 php71 -> [email protected]                        wpcli-completion -> wp-cli-completion
crystal-lang -> crystal                 php56 -> [email protected]                        rebar@3 -> rebar3
geth -> ethereum                        php70 -> [email protected]                        saltstack -> salt
==> Deleted Formulae
arm                        boot2docker-completion     gpg-agent                  [email protected]                   onepass                    sonarlint
artifactory-cli-go         casperjs                   hachoir-metadata           luciddb                    [email protected]                     submarine
asciinema2gif              dirmngr                    i3                         mediatomb                  queequeg                   wry
aws-cloudsearch            ecj                        i3status                   mimms                      reclass
bokken                     [email protected]                    ib                         monotone                   [email protected]
boot2docker                [email protected]                  juju-quickstart            node@4                     sickbeard
Updating Homebrew...
==> Upgrading 1 outdated package:
ffmpeg 3.4.2 -> 4.0.2
==> Upgrading ffmpeg
==> Downloading 
https://homebrew.bintray.com/bottles/ffmpeg-4.0.2.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring ffmpeg-4.0.2.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/ffmpeg/4.0.2: 246 files, 49.7MB
                                                                           0.4%
然后看看ffmpeg是否是新版本,以及是否有libass
➜  ffmpeg_edit_subtitle ffmpeg --help
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  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
是更新的版本:4.0.2
但是默认没有安装libass
再去重新安装:
brew reinstall ffmpeg \
    --with-tools \
    --with-fdk-aac \
    --with-freetype \
    --with-fontconfig \
    --with-libass \
    --with-libvorbis \
    --with-libvpx \
    --with-opus \
    --with-x265
然后等待:
➜  ffmpeg_edit_subtitle brew reinstall ffmpeg \
    --with-tools \
    --with-fdk-aac \
    --with-freetype \
    --with-fontconfig \
    --with-libass \
    --with-libvorbis \
    --with-libvpx \
    --with-opus \
    --with-x265
==> Reinstalling ffmpeg --with-fdk-aac --with-libass --with-tools --with-x265 --with-fontconfig --with-freetype --with-libvorbis --with-libvpx --with-
==> Installing dependencies for ffmpeg: texi2html, fdk-aac, libpng, freetype, fontconfig, fribidi, libffi, glib, pixman, cairo, graphite2, icu4c, harfbuzz, libass, libogg, libvorbis, libvpx, opus and x265
==> Installing ffmpeg dependency: texi2html
==> Downloading 
https://homebrew.bintray.com/bottles/texi2html-5.0.high_sierra.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring texi2html-5.0.high_sierra.bottle.1.tar.gz
🍺  /usr/local/Cellar/texi2html/5.0: 279 files, 6.2MB
==> Installing ffmpeg dependency: fdk-aac
==> Downloading 
https://homebrew.bintray.com/bottles/fdk-aac-0.1.6.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring fdk-aac-0.1.6.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/fdk-aac/0.1.6: 14 files, 1.8MB
==> Installing ffmpeg dependency: libpng
==> Downloading 
https://homebrew.bintray.com/bottles/libpng-1.6.35.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libpng-1.6.35.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/libpng/1.6.35: 26 files, 1.2MB
==> Installing ffmpeg dependency: freetype
==> Downloading 
https://homebrew.bintray.com/bottles/freetype-2.9.1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring freetype-2.9.1.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/freetype/2.9.1: 60 files, 2.6MB
==> Installing ffmpeg dependency: fontconfig
==> Downloading 
https://homebrew.bintray.com/bottles/fontconfig-2.13.1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring fontconfig-2.13.1.high_sierra.bottle.tar.gz
==> Regenerating font cache, this may take a while
==> /usr/local/Cellar/fontconfig/2.13.1/bin/fc-cache -frv
🍺  /usr/local/Cellar/fontconfig/2.13.1: 531 files, 3.3MB
==> Installing ffmpeg dependency: fribidi
==> Downloading 
https://homebrew.bintray.com/bottles/fribidi-1.0.5.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring fribidi-1.0.5.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/fribidi/1.0.5: 66 files, 580.7KB
==> Installing ffmpeg dependency: libffi
==> Downloading 
https://homebrew.bintray.com/bottles/libffi-3.2.1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libffi-3.2.1.high_sierra.bottle.tar.gz
==> Caveats
libffi is keg-only, which means it was not symlinked into /usr/local,
because some formulae require a newer version of libffi.

For compilers to find libffi you may need to set:
  export LDFLAGS="-L/usr/local/opt/libffi/lib"

==> Summary
🍺  /usr/local/Cellar/libffi/3.2.1: 16 files, 297.0KB
==> Installing ffmpeg dependency: glib
==> Downloading 
https://homebrew.bintray.com/bottles/glib-2.58.1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring glib-2.58.1.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/glib/2.58.1: 435 files, 18.4MB
==> Installing ffmpeg dependency: pixman
==> Downloading 
https://homebrew.bintray.com/bottles/pixman-0.34.0_1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pixman-0.34.0_1.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/pixman/0.34.0_1: 13 files, 1.3MB
==> Installing ffmpeg dependency: cairo
==> Downloading 
https://homebrew.bintray.com/bottles/cairo-1.14.12.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring cairo-1.14.12.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/cairo/1.14.12: 118 files, 5.8MB
==> Installing ffmpeg dependency: graphite2
==> Downloading 
https://homebrew.bintray.com/bottles/graphite2-1.3.12.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring graphite2-1.3.12.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/graphite2/1.3.12: 18 files, 235.9KB
==> Installing ffmpeg dependency: icu4c
==> Downloading 
https://homebrew.bintray.com/bottles/icu4c-62.1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring icu4c-62.1.high_sierra.bottle.tar.gz
==> Caveats
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c first in your PATH run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc

For compilers to find icu4c you may need to set:
  export LDFLAGS="-L/usr/local/opt/icu4c/lib"
  export CPPFLAGS="-I/usr/local/opt/icu4c/include"

==> Summary
🍺  /usr/local/Cellar/icu4c/62.1: 250 files, 67.3MB
==> Installing ffmpeg dependency: harfbuzz
==> Downloading 
https://homebrew.bintray.com/bottles/harfbuzz-1.9.0.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring harfbuzz-1.9.0.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/harfbuzz/1.9.0: 148 files, 6.3MB
==> Installing ffmpeg dependency: libass
==> Downloading 
https://homebrew.bintray.com/bottles/libass-0.14.0_1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libass-0.14.0_1.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/libass/0.14.0_1: 10 files, 515.8KB
==> Installing ffmpeg dependency: libogg
==> Downloading 
https://homebrew.bintray.com/bottles/libogg-1.3.3.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libogg-1.3.3.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/libogg/1.3.3: 97 files, 460.2KB
==> Installing ffmpeg dependency: libvorbis
==> Downloading 
https://homebrew.bintray.com/bottles/libvorbis-1.3.6.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libvorbis-1.3.6.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/libvorbis/1.3.6: 157 files, 2.3MB
==> Installing ffmpeg dependency: libvpx
==> Downloading 
https://homebrew.bintray.com/bottles/libvpx-1.7.0.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libvpx-1.7.0.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/libvpx/1.7.0: 17 files, 1.4MB
==> Installing ffmpeg dependency: opus
==> Downloading 
https://homebrew.bintray.com/bottles/opus-1.2.1.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring opus-1.2.1.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/opus/1.2.1: 16 files, 868.7KB
==> Installing ffmpeg dependency: x265
==> Downloading 
https://homebrew.bintray.com/bottles/x265-2.9.high_sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring x265-2.9.high_sierra.bottle.tar.gz
🍺  /usr/local/Cellar/x265/2.9: 11 files, 35.2MB
==> Installing ffmpeg --with-fdk-aac --with-libass --with-tools --with-x265 --with-fontconfig --with-freetype --with-libvorbis --with-libvpx --with-op
==> Downloading 
https://ffmpeg.org/releases/ffmpeg-4.0.2.tar.xz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=c
==> make install
==> make alltools
🍺  /usr/local/Cellar/ffmpeg/4.0.2: 277 files, 51.4MB, built in 21 minutes 39 seconds
==> Caveats
==> libffi
libffi is keg-only, which means it was not symlinked into /usr/local,
because some formulae require a newer version of libffi.

For compilers to find libffi you may need to set:
  export LDFLAGS="-L/usr/local/opt/libffi/lib"

==> icu4c
icu4c is keg-only, which means it was not symlinked into /usr/local,
because macOS provides libicucore.dylib (but nothing else).

If you need to have icu4c first in your PATH run:
  echo 'export PATH="/usr/local/opt/icu4c/bin:$PATH"' >> ~/.zshrc
  echo 'export PATH="/usr/local/opt/icu4c/sbin:$PATH"' >> ~/.zshrc

For compilers to find icu4c you may need to set:
  export LDFLAGS="-L/usr/local/opt/icu4c/lib"
  export CPPFLAGS="-I/usr/local/opt/icu4c/include"
然后看看是否支持了:
➜  ffmpeg_edit_subtitle ffmpeg --help
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 10.0.0 (clang-1000.11.45.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfontconfig --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --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
果然支持:libass了
【总结】
此处,想要用:
brew reinstall ffmpeg \
    --with-tools \
    --with-fdk-aac \
    --with-freetype \
    --with-fontconfig \
    --with-libass \
    --with-libvorbis \
    --with-libvpx \
    --with-opus \
    --with-x265
给ffmpeg添加ass的支持,结果报错:
Error: Calling keg_only :provided_pre_mountain_lion is disabled! There is no replacement.
然后去通过更新:
brew update && brew upgrade ffmpeg
再去:
brew reinstall ffmpeg \
    --with-tools \
    --with-fdk-aac \
    --with-freetype \
    --with-fontconfig \
    --with-libass \
    --with-libvorbis \
    --with-libvpx \
    --with-opus \
    --with-x265
即可解决此问题。

转载请注明:在路上 » 【已解决】Mac中brew reinstall ffmpeg出错:Error: Calling keg_only :provided_pre_mountain_lion is disabled! There is no replacement

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
105 queries in 0.205 seconds, using 22.19MB memory