国产化替代是将来各单位的主流趋势,探索自行开发应用程序在国产操作系统上正常运行是将来的主要工作之一。本文浅尝gui程序在统信社区版——deepin上遇到的小问题。
使用Qt在deepin上做了一个类似gif的帧动画弹窗,在编译运行时,程序可以正常运行,但是会报错显示:
qt.qpa.plugin: Could not find the Qt platform plugin "dxcb" in ""
在网上查,有说需要在/etc/profile中添加环境变量
export QT_QPA_PLATFORM_PLUGIN_PATH=/path/to/Qt/plugins/platforms
试了,还是报错,但程序能运行。
直接在终端运行编译后的可执行文件,又报如下错误:
/home/shell811127/workspace/qt/build-test-unknown-Debug/test: error while loading shared libraries: libicui18n.so.63: cannot open shared object file: No such file or directory
使用ldd查看程序依赖的链接库,发现有3个依赖找不到,其中包括上面报错的库名
ldd /home/shell811127/workspace/qt/build-test-unknown-Debug/test
linux-vdso.so.1 (0x00007ffe3cfa9000)
libQt5Widgets.so.5 => /opt/deepin-shared-libs/Qt5.15.10gles/lib/libQt5Widgets.so.5 (0x00007f7511e00000)
libQt5Gui.so.5 => /opt/deepin-shared-libs/Qt5.15.10gles/lib/libQt5Gui.so.5

最低0.47元/天 解锁文章
891






