Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问我按build.sh编译好后,直接运行,报这个错怎么解决 #38

Open
JoyTrndsttr opened this issue Apr 11, 2022 · 9 comments

Comments

@JoyTrndsttr
Copy link

截屏2022-04-11 上午11 05 57

@DefTruth
Copy link
Owner

你cd到build/lite.ai.toolkit/bin 再运行试试

@JoyTrndsttr
Copy link
Author

试过了,还是不行。是还有啥环境需要配吗?

@DefTruth
Copy link
Owner

这是ffmepg的链接的问题,如果要编解码的mp4的话,就要用到。之前已经解决过一次了,不知道为啥你的还是跑不了...如果是M1的话,目前确实是不支持的。你这里提示是是找不到ffmpeg的库,可以用 otool -L lite_rvm 、otool -L libopencv_videoio.dylib、otool -L libavformat.58.dylib 查一下库的依赖关系。相关的issue可参考:

@DefTruth
Copy link
Owner

因为我已经将ffmpeg打包进lite.ai.toolkit了,所以哪怕你的系统没有安装ffmpeg,应该也是可以运行的。我的log是这样的,卸载掉系统安装的ffmpeg,也是可以正常运行:
image
至于如何打包ffmpeg,你可以看我写的一篇文章:

@JoyTrndsttr
Copy link
Author

我芯片不是M1,我详细看了那篇issue,用最后的方法也还是不行,安装了ffrmpeg还是不行
截屏2022-04-11 下午3 56 19

@JoyTrndsttr
Copy link
Author

查看的库依赖关系为

wangke@wangkedeMacBook-Pro bin % otool -L libavformat.58.dylib
libavformat.58.dylib:
./libavformat.58.dylib (compatibility version 58.0.0, current version 58.29.100)
./libavcodec.58.dylib (compatibility version 58.0.0, current version 58.54.100)
./libswresample.3.dylib (compatibility version 3.0.0, current version 3.5.100)
./libavutil.56.dylib (compatibility version 56.0.0, current version 56.31.100)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
/usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1677.104.0)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 59306.140.5)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/usr/local/opt/xz/lib/liblzma.5.dylib (compatibility version 8.0.0, current version 8.5.0)
/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox (compatibility version 1.0.0, current version 1000.0.0)
/System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 1.5.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1069.24.0)

截屏2022-04-11 下午3 51 51

截屏2022-04-11 下午3 49 45

@DefTruth
Copy link
Owner

我芯片不是M1,我详细看了那篇issue,用最后的方法也还是不行,安装了ffrmpeg还是不行 截屏2022-04-11 下午3 56 19

说明ffmpeg已经链接上了,报的是缺少libxcb这个库,一般mac下会有安装这个库。你的问题和另一个issue是一样的,解决方案请参考:

@JoyTrndsttr
Copy link
Author

我明白啦!太感谢了!另外我想问下,我有什么办法能把mac上的这个项目打包成可执行文件然后部署到window上吗?

@DefTruth
Copy link
Owner

应该不行的吧,两个操作系统都不一样,windows下需要重新编译,而且还比较麻烦。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants