M2pro Mac opencv c++ 失败,但它在几天前正常工作 [已关闭]

M2pro Mac opencv c++ failed,but it worked normally serveral days ago [closed]

提问人:xin 提问时间:11/14/2023 最后编辑:genpfaultxin 更新时间:11/14/2023 访问量:36

问:


编辑问题以包括所需的行为、特定问题或错误以及重现问题所需的最短代码。这将帮助其他人回答这个问题。

7天前关闭。

错误如下:

g++ main.cpp -std=c++14 `pkg-config --cflags --libs opencv4`
./a.out
dyld[73360]: Library not loaded: /opt/homebrew/opt/mbedtls/lib/libmbedcrypto.14.dylib
  Referenced from: <8C2E2CF9-054E-300F-BDE7-3DE52F848638> /opt/homebrew/Cellar/librist/0.2.7_3/lib/librist.4.dylib
  Reason: tried: '/opt/homebrew/opt/mbedtls/lib/libmbedcrypto.14.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/mbedtls/lib/libmbedcrypto.14.dylib' (no such file), '/opt/homebrew/opt/mbedtls/lib/libmbedcrypto.14.dylib' (no such file), '/usr/local/lib/libmbedcrypto.14.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/usr/lib/libmbedcrypto.14.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/mbedtls/3.5.1/lib/libmbedcrypto.14.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/mbedtls/3.5.1/lib/libmbedcrypto.14.dylib' (no such file), '/opt/homebrew/Cellar/mbedtls/3.5.1/lib/libmbedcrypto.14.dylib' (no such file), '/usr/local/lib/libmbedcrypto.14.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/usr/lib/libmbedcrypto.14.dylib' (no such file, not in dyld cache)
[1]    73360 abort      ./a.out

我试图重新安装opencv,但没有用

C++ macOS OpenCV ARM

评论

0赞 BoP 11/14/2023
显然,几天前某处有一个 ARM 文件。现在只有 x86_64 (Intel) 文件。您是否“重新安装”了其他版本?我们无法知道。

答: 暂无答案