注:作者这里不建议采用Qt4版本就行安装,因为存在一些安全问题。(官网有发布,读者不相信的话可以试试,本人已试过,确实错在安装问题,除了升级安装高版本Qt,无解。)
1、下载Qt5源码-qt-everywhere-opensource-src-5.9.6.tar.xz
https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/5.9/5.9.6/single/qt-everywhere-opensource-src-5.9.6.tar.xz
2、将源码拷贝至指定目录、解压、给权限
cp qt-everywhere-opensource-src-5.9.6.tar.xz /usr/local
tar -Jxf qt-everywher