最近更新到Mavericks 10.9.5之后,我的ffmpeg安装一直在讨论
错误:
dyld: Library not loaded: /usr/local/lib/libx264.142.dylib
Referenced from: /usr/local/bin/ffmpeg
Reason: image not found
Trace/BPT trap: 5
有什么想法?我不熟悉手动编译,我通过Homebrew安装了ffmpeg。
我尝试卸载并执行:
brew install ffmpeg --HEAD
brew install ffmpeg --build-from-source
但它会回吐./configure错误
==> ./configure --prefix=/usr/local/Cellar/ffmpeg/2.4.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
These open issues may also help:
gpac 0.5.0 doesn't build against ffmpeg 2.4.1 (https://github.com/Homebrew/homebrew/issues/32978)
答案 0 :(得分:14)
经过一番摆弄后我的解决方案。
brew uninstall ffmpeg
brew doctor
然后它告诉我,我有一个未链接的ffmpeg,我有一些依赖
brew install faac lame xvid
brew doctor
然后它告诉我,我刚刚有一个没有关联的项目。
brew install ffmpeg
并且有效。
答案 1 :(得分:5)
brew upgrade ffmpeg
为我工作
答案 2 :(得分:1)
我认为詹姆斯指出这是值得分享的。我有类似的问题,能够通过查看/ usr / local / lib / lib的位置来修复我的问题
dyld: Library not loaded: /usr/local/lib/libx264.142.dylib
$ ls -lsha /usr/local/lib/libx264.*
在我的情况下,我发现我安装了libx264,但与ffmpeg正在寻找的版本不同。我找到了
/usr/local/lib/libx264.152.dylib
是指向实际安装位置的符号链接
/usr/local/Cellar/x264/r2854/lib/libx264.152.dylib
请注意,这只是版本号的差异,因此我必须创建一个指向ffmpeg所需版本的符号链接。通过以下命令,我能够在MacOS 10.13上解决此问题
sudo ln -s /usr/local/Cellar/x264/r2854/lib/libx264.152.dylib /usr/local/lib/libx264.148.dylib
我唯一能想到的问题是函数折旧等不兼容问题(因为我使用的是较新版本),这种问题并未发生。我希望这也会对某人有所帮助。如果它与我的不同,您将需要使用系统中可用的确切版本。
答案 3 :(得分:-3)
对于High Sierra(macOS 10.13)我在chrisallick的回答中尝试了卸载ffmpeg方法,但它并没有为我解决问题。我最后向前迈出了一大步,完全拆除并重新安装了我的自制软件。
自行承担风险。
步骤1.卸载Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
步骤2.安装Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
步骤3.安装ffmpeg
brew install ffmpeg
显然,如果选择此选项,则必须重新安装通过自制程序安装的任何其他应用程序。
这种方法在High Sierra实际上对我有用。可能有一个更直接的方法,直到有人发布它,考虑这样做。再一次,chrisallick更直接的方法并没有真正适用于我的案例。