dgod:qt版本小版本也必须大于等于插件的版本。实在不行,还是得重新编译。回到原帖
找到了原因:
Debian 系下,之所以 KDE 可用,而同版本的 KDE 在 Arch 上用不了,是因为「qtbase5-dev」这个包,该包,在 Arch 上,名为「
qt5-base」
https://archlinux.org/packages/extra/x86_64/qt5-base/
观察 「Package Contents」可见,它是没有「Qt5.pc」文件的。
而「Qt5.pc」文件,是「Qt5」的目录分布:
# Qt5.pccat >%{buildroot}%{_libdir}/pkgconfig/Qt5.pc<<EOFprefix=%{_qt5_prefix}archdatadir=%{_qt5_archdatadir}bindir=%{_qt5_bindir}datadir=%{_qt5_datadir}docdir=%{_qt5_docdir}examplesdir=%{_qt5_examplesdir}headerdir=%{_qt5_headerdir}importdir=%{_qt5_importdir}libdir=%{_qt5_libdir}libexecdir=%{_qt5_libexecdir}moc=%{_qt5_bindir}/mocplugindir=%{_qt5_plugindir}qmake=%{_qt5_bindir}/qmakesettingsdir=%{_qt5_settingsdir}sysconfdir=%{_qt5_sysconfdir}translationdir=%{_qt5_translationdir}Name: Qt5Description: Qt5 Configuration
Version: 5.15.2
EOF
所以,不管是 Qt 插件的使用,还是 Qt插件的编译,都是在 Arch 下不可能完成的:
~/yong-master node build.js -C im/qt5-im ✔
Package Qt5 was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5.pc'
to the PKG_CONFIG_PATH environment variable
Package 'Qt5', required by 'virtual:world', not found
node:child_process:903
throw err;
^
Error: Command failed: pkg-config --modversion Qt5
Package Qt5 was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5.pc'
to the PKG_CONFIG_PATH environment variable
Package 'Qt5', required by 'virtual:world', not found
at checkExecSyncError (node:child_process:826:11)
at Object.execSync (node:child_process:900:15)
at shell (/home/i7/yong-master/build.js:589:23)
at run (eval at _build_step (/home/i7/yong-master/build.js:528:8), <anonymous>:28:13)
at eval (eval at _build_step (/home/i7/yong-master/build.js:528:8), <anonymous>:69:2)
at _build_step (/home/i7/yong-master/build.js:528:8)
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
status: 1,
signal: null,
output: [
null,
'',
'Package Qt5 was not found in the pkg-config search path.\n' +
"Perhaps you should add the directory containing `Qt5.pc'\n" +
'to the PKG_CONFIG_PATH environment variable\n' +
"Package 'Qt5', required by 'virtual:world', not found\n"
],
pid: 1281,
stdout: '',
stderr: 'Package Qt5 was not found in the pkg-config search path.\n' +
"Perhaps you should add the directory containing `Qt5.pc'\n" +
'to the PKG_CONFIG_PATH environment variable\n' +
"Package 'Qt5', required by 'virtual:world', not found\n"
}
Node.js v17.3.0