macos - dyld:未找到符号:_objc_alloc_init
问题描述
我在一台 mac 下构建了静态 ffmpeg 二进制文件,当我尝试在另一台 mac 下运行二进制文件时,出现以下错误:
./ffmpeg -f avfoundation -list_devices true -i ''
ffmpeg version N-95218-g7da57875b5 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.0 (clang-1100.0.33.8)
configuration: --pkg-config-flags=--static --disable-ffplay --disable-debug --disable-doc --enable-filter=format --disable-d3d11va --disable-dxva2 --disable-network --disable-iconv --disable-protocol=crypto --enable-libopus --enable-libvorbis --enable-libmp3lame --enable-libopenh264 --enable-libtheora --enable-libvpx --enable-libwebp --disable-protocol=hls --disable-protocol=cache --extra-ldexeflags='-Bstatic -L/usr/local/lib -L/usr/local/opt/llvm/lib' --extra-cflags='-I/usr/local/include -static -I/usr/local/opt/llvm/include -I/usr/local/opt/llvm/include/c++/v1/ -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AVFoundation.framework/Versions/A/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Versions/A/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Versions/A/Headers' --disable-bzlib --disable-appkit --disable-coreimage --disable-indevs --enable-indev=lavfi --disable-asm --enable-indev=avfoundation --cc=/usr/bin/clang
libavutil 56. 35.100 / 56. 35.100
libavcodec 58. 59.101 / 58. 59.101
libavformat 58. 33.100 / 58. 33.100
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 61.100 / 7. 61.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
dyld: lazy symbol binding failed: Symbol not found: _objc_alloc_init
Referenced from: ffmpeg (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libobjc.A.dylib
dyld: Symbol not found: _objc_alloc_init
Referenced from: ffmpeg (which was built for Mac OS X 10.15)
Expected in: /usr/lib/libobjc.A.dylib
中止陷阱:6
请指教。
解决方案
推荐阅读
- c++ - 如何使类 Forum 使用 C++ 中的字符串?
- javascript - 根据指定长度的元素创建新 div 的最佳方法?
- arrays - 为什么在使用指针访问未对齐的 uint16 数组时会引发“对齐异常”,但在使用下标访问数组时却不会?
- java - 添加偶数/奇数的方法
- python - 根据开始日期频率和当前日期计算下一个到期日
- angular - Angular 7 - 动态 HighChart 更新
- sql - 全部刷新会刷新连接但不刷新表
- asp.net - 将 appSetting 值替换为部署期间在 aws Elastic Beanstalk 中定义的环境属性的值
- javascript - 将=的(响应)高度设置为另一个的高度
- python - 用于网格显示的 Python 图形库