qtcreator 在线dbg嵌入式 异常 index cache: could not make cache directory: Permission denied
1. 主机系统
Linux jz 6.2.0-37-generic #38~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 2 18:01:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
2. 嵌入式系统
Linux ls 4.14.61-svn7536 #200 SMP PREEMPT Wed Dec 6 10:24:51 CST 2023 aarch64 GNU/Linux
3. Qt Creator 11.0.2在线调试,报错误
index cache: could not make cache directory: Permission denied
经查是版本缺陷:
[QTCREATORBUG-29556] Index cache related message flooding with debugging - Qt Bug Tracker
4. 使用qt自带的MaintenanceTool工具更新到12.0.0版本,打开时报新错误:
Could not load the Qt platform plugin “xcb“
5. 参考博文“Ubuntu18.04下解决Qt出现qt.qpa.plugin:Could not load the Qt platform plugin “xcb“问题_qt.qpa.plugin xcb-CSDN博客”,具体原因为:
qt.core.plugin.factoryloader: checking directory path "/opt/Qt/Tools/QtCreator/bin/platforms" ...
qt.core.library: "/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so" cannot load: Cannot load library /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/libqxcb.so: (libxcb-cursor.so.0: 无法打开共享对象文件: 没有那个文件或目录)
6. 只是跟博文的依赖库有所不同,更新之:
/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms# ldd libqxcb.so
linux-vdso.so.1 (0x00007fff20172000)
libQt6XcbQpa.so.6 => /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/./../../lib/libQt6XcbQpa.so.6 (0x00007fc8df163000)
libxkbcommon-x11.so.0 => /lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007fc8df148000)
libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fc8df101000)
libxcb-cursor.so.0 => not found
platforms# apt-get install libxcb-cursor0
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列【新】软件包将被安装:
libxcb-cursor0
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 61 个软件包未被升级。
需要下载 10.5 kB 的归档。
解压缩后会消耗 39.9 kB 的额外空间。
获取:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 libxcb-cursor0 amd64 0.1.1-4ubuntu1 [10.5 kB]
已下载 10.5 kB,耗时 2秒 (6,739 B/s)
正在选中未选择的软件包 libxcb-cursor0:amd64。
(正在读取数据库 ... 系统当前共安装有 196002 个文件和目录。)
准备解压 .../libxcb-cursor0_0.1.1-4ubuntu1_amd64.deb ...
正在解压 libxcb-cursor0:amd64 (0.1.1-4ubuntu1) ...
正在设置 libxcb-cursor0:amd64 (0.1.1-4ubuntu1) ...
正在处理用于 libc-bin (2.35-0ubuntu3.4) 的触发器 ...
root@jz:/opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms# ldd libqxcb.so
linux-vdso.so.1 (0x00007ffe0d3f9000)
libQt6XcbQpa.so.6 => /opt/Qt/Tools/QtCreator/lib/Qt/plugins/platforms/./../../lib/libQt6XcbQpa.so.6 (0x00007efeec4b5000)
libxkbcommon-x11.so.0 => /lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007efeec49a000)
libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007efeec453000)
libxcb-cursor.so.0 => /lib/x86_64-linux-gnu/libxcb-cursor.so.0 (0x00007efeec200000)
libxcb-icccm.so.4 => /lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007efeec44c000)
libxcb-image.so.0 => /lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007efeec444000)
libxcb-keysyms.so.1 => /lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007efeec43f000)
libxcb-randr.so.0 => /lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007efeec42c000)
libxcb-render-util.so.0 => /lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007efeec425000)
libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007efeec420000)
libxcb-sync.so.1 => /lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007efeec416000)
libxcb-xfixes.so.0 => /lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007efeec40a000)
libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007efeec1f1000)
libxcb-shape.so.0 => /lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007efeec1ec000)
libxcb-xkb.so.1 => /lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007efeec1ce000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007efeec1a4000)
7. 再次打开qtcreator,正常启动。