首页 > 解决方案 > 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

请指教。

标签: macosffmpeg

解决方案


推荐阅读