问题描述:
在官网上下载了linux版本的ovito,解压缩后双击 /bin 目录中的可执行文件没有反应,使用终端打开,输入命令:./ovito
结果如下:
root@node01:/home/Junjie/ovito-basic-3.9.4-x86_64/bin# ./ovito
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: minimal, wayland, xcb.
已放弃 (核心已转储)
解决办法
说明是Qt程序出了问题,这里已经提示说可能是缺少xcb-cursor0 或者 libxcb-cursor0,说明可能是动态链接库的问题。如果这里没有显示出详细的错误信息,则需要在终端中输入以下命令,以获取更详细的错误信息:
root@node01:/home/Junjie/ovito-basic-3.9.4-x86_64/bin# export QT_DEBUG_PLUGINS=1
再次输入命令打开可执行文件,可以看到详细报错信息
oot@node01:/home/Junjie/ovito-basic-3.9.4-x86_64/bin# ./ovito
qt.core.plugin.factoryloader: checking directory path "/home/Junjie/ovito-basic-3.9.4-x86_64/lib/ovito/plugins_qt/platforms" ...
qt.core.plugin.factoryloader: looking at "/home/Junjie/ovito-basic-3.9.4-x86_64/lib/ovito/plugins_qt/platforms/libqminimal.so"
qt.core.plugin.loader: Found metadata in lib /home/Junjie/ovito-basic-3.9.4-x86_64/lib/ovito/plugins_qt/platforms/libqminimal.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimal"
]
},
"archlevel": 1,
"className": "QMinimalIntegrationPlugin",
"debug": false,
"version": 394496
}
qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")
qt.core.plugin.factoryloader: looking at "/home/Junjie/ovito-basic-3.9.4-x86_64/lib/ovito/plugins_qt/platforms/libqwayland-generic.so"
qt.core.plugin.loader: Found metadata in lib /home/Junjie/ovito-basic-3.9.4-x86_64/lib/ovito/plugins_qt/platforms/libqwayland-generic.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"wayland"
]
},
"archlevel": 1,
"className": "QWaylandIntegrationPlugin",
"debug": false,
"version": 394496
}
qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland")
qt.core.plugin.factoryloader: looking at "/home/Junjie/ovito-basic-3.9.4-x86_64/lib/ovito/plugins_qt/platforms/libqxcb.so"
qt.core.plugin.loader: Found metadata in lib /home/Junjie/ovito-basic-3.9.4-x86_64/lib/ovito/plugins_qt/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"archlevel": 1,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 394496
}
qt.core.plugin.factoryloader: Got keys from plugin meta data QList("xcb")
qt.core.plugin.factoryloader: checking directory path "/home/Junjie/ovito-basic-3.9.4-x86_64/bin/platforms" ...
qt.core.library: "/home/Junjie/ovito-basic-3.9.4-x86_64/lib/ovito/plugins_qt/platforms/libqxcb.so" cannot load: Cannot load library /home/Junjie/ovito-basic-3.9.4-x86_64/lib/ovito/plugins_qt/platforms/libqxcb.so: (libxcb-cursor.so.0: 无法打开共享对象文件: 没有那个文件或目录)
qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "/home/Junjie/ovito-basic-3.9.4-x86_64/lib/ovito/plugins_qt/platforms/libqxcb.so" : "Cannot load library /home/Junjie/ovito-basic-3.9.4-x86_64/lib/ovito/plugins_qt/platforms/libqxcb.so: (libxcb-cursor.so.0: 无法打开共享对象文件: 没有那个文件或目录)"
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: minimal, wayland, xcb.
已放弃 (核心已转储)
说明确实是缺少 libxcb-cursor0 这个库,需要安装,输入命令:文章来源:https://www.toymoban.com/news/detail-771817.html
root@node01:/home/Junjie/ovito-basic-3.9.4-x86_64/bin# sudo apt-get install libxcb-cursor0
安装完成后再次打开可执行文件(ovito),成功!文章来源地址https://www.toymoban.com/news/detail-771817.html
到了这里,关于ubuntu22.04解决可执行文件(ovito)打不开的问题的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!