输入nv-nsight-cu或者ncu-ui后,最开始是等待一段时间没有反应,于是我重新安装了新版本的nsight computer:在root下输入sudo apt install nsight-computer 2022.2重新安装
安装完成后出现以下错误
Available platform plugins are: xcb.
Application could not be initialized!
This is likely due to missing Qt platform dependencies.
For a list of dependencies, please refer to https://doc.qt.io/qt-5/linux-requirements.html
To view missing libraries, set QT_DEBUG_PLUGINS=1 and re-run the application.
中的方法添加环境变量,但是我的设备直接输入 sudo gedit ~/.bashrc打不开文件,可以使用vim或者直接在本地修改后上传到服务器。也可以直接在终端输入export QT_DEBUG_PLUGINS=1。然后又出现了以下错误:
QFactoryLoader::QFactoryLoader() checking directory path "/opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so"
Found metadata in lib /opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"archreq": 0,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 393728
}
Got keys from plugin meta data QList("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/platforms" ...
Cannot load library /opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so: (libxcb-xinput.so.0: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so" : "Cannot load library /opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so: (libxcb-xinput.so.0: cannot open shared object file: No such file or directory)"
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: xcb.
Application could not be initialized!
This is likely due to missing Qt platform dependencies.
For a list of dependencies, please refer to https://doc.qt.io/qt-5/linux-requirements.html
To view missing libraries, set QT_DEBUG_PLUGINS=1 and re-run the application.
Warning: OpenGL Version check failed. Falling back to Mesa software rendering.
QFactoryLoader::QFactoryLoader() checking directory path "/opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so"
Found metadata in lib /opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"archreq": 0,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 393728
}
Got keys from plugin meta data QList("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/platforms" ...
Cannot load library /opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so: (libxcb-xinput.so.0: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so" : "Cannot load library /opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/Plugins/platforms/libqxcb.so: (libxcb-xinput.so.0: cannot open shared object file: No such file or directory)"
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: xcb.
/opt/nvidia/nsight-compute/2022.2.0/host/linux-desktop-glibc_2_11_3-x64/ncu-ui: line 26: 29071 Aborted (core dumped) "$NV_AGORA_PATH/CrashReporter" "NVIDIA Nsight Compute" "NVIDIA Nsight Compute" "2022.2.0.0 (build 31140043) (public-release)" "$NV_AGORA_PATH/ncu-ui.bin" "$@"
从以上信息中可以看到 更具体的错误位置,我的问题是找不到libxcb-xinput.so.0这个文件,于是
sudo apt-get install libxcb-xinput0
问题解决了。