音视频-记一个QT编译问题
2021-07-19 本文已影响0人
li_礼光
可能是因为安装或者其他莫名操作升级了libicui18n.68.dylib , 变成了 libicui18n.69.dylib. 在编译QT项目的时候遇到了下面的错误.
12:08:10: 为项目12_h264_encode执行步骤 ...
12:08:10: 配置没有改变, 跳过 qmake 步骤。
12:08:10: 正在启动 "/usr/bin/make" -j8
/usr/local/Cellar/qt/6.0.2/bin/uic ../12_h264_encode/mainwindow.ui -o ui_mainwindow.h
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.68.dylib
Referenced from: /usr/local/Cellar/qt/6.0.2/lib/QtCore.framework/Versions/A/QtCore
Reason: image not found
make: *** [ui_mainwindow.h] Abort trap: 6
12:08:10: 进程"/usr/bin/make"退出,退出代码 2 。
Error while building/deploying project 12_h264_encode (kit: Desktop (x86-darwin-generic-mach_o-64bit))
When executing step "Make"
12:08:10: Elapsed time: 00:00.
遇到问题 : Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.68.dylib
使用brew安装旧版本icu4c,icu4c 68.2
进入homebrew目录
cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
查看git的提交记录
git log --follow icu4c.rb
切换到68.2的提交
git checkout -b icu4c-68.2 fdba13da61f815f5ab0789f4af72b8f9d05543a6
brew重新安装icu4c
brew reinstall ./icu4c.rb