1. 资料准备
我们这里安装时候使用的是Qt5.12.12版本。
文件的名称是:qt-opensource-linux-x64-5.12.12.run.
2. 遇到的问题
我想安装给所有的用户使用,因此切换到root
用户安装.
安装过程中报错如下:
bogon:/opt # ./qt-opensource-linux-x64-5.12.12.run
qt.qpa.xcb: could not connect to display
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, xcb.
Aborted (core dumped)
这时候,我想到,是不是我已经安装了系统自带安装Software
里面的Qt ,结果卸载了仍旧报上面的错误。
3. 意外的解决
当我切换到普通用户的时候,发现能够安装了,输出下面的内容:
xxx@bogon:/opt> ./qt-opensource-linux-x64-5.12.12.run
[1] Warning: Qt Account settings file [/home/xxx/.local/share/Qt/qtaccount.ini] does not exist.
[1] Warning: Could not find Qt Account.
[127] Warning: No QtAccount credentials found. Please login via the maintenance tool of the SDK.
[1210] Warning: No QtAccount credentials found. Please login via the maintenance tool of the SDK.
[1210] Warning: No QtAccount credentials found. Please login via the maintenance tool of the SDK.
并且出现了如下的界面:
4. 结论
看来不同的用户对于Qt的安装是有影响的。
5. 内容更新
后来发现在普通用户下sudo su
执行带界面的都不太好使,需要在在root下开vnc,然后再执行一些带界面的就好用了。
具体忘记了,好像先执行了gedit
等系统的工具,就能root
用户执行上面的安装了。