CentOS7中安装和卸载QT5.9.5
1、下载
wget http://download.qt.io/official_releases/qt/5.9/5.9.5/qt-opensource-linux-x64-5.9.5.run
手动下载链接:http://download.qt.io/archive/qt
2、预安装
yum -y install mesa-libGL-devel mesa-libGLU-devel freeglut-devel
3、赋予文件可执行权限
chmod +x qt-opensource-linux-x64-5.9.5.run
4、安装
./qt-opensource-linux-x64-5.9.5.run
5、配置环境
[root@192 ~]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
[root@192 ~]# echo "/opt/Qt5.9.5/5.9.5/gcc_64/lib" >> /etc/ld.so.conf
[root@192 ~]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/opt/Qt5.9.5/5.9.5/gcc_64/lib
[root@192 QtCreator]# echo "/opt/Qt5.9.5/Tools/QtCreator/lib" >> etc/ld.so.conf
[root@192 QtCreator]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/opt/Qt5.9.5/5.9.5/gcc_64/lib
/opt/Qt5.9.5/Tools/QtCreator/lib
[root@192 ~]# ldconfig
[root@192 ~]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/opt/Qt5.9.5/5.9.5/gcc_64/lib
6、设置PATH环境变量
vi /etc/profile
在最后一行加入下面的内容(如果前面是默认安装就跟下面的路径一样,如果不是默认安装,需把/opt换成自己安装路径):
export PATH="/opt/Qt5.9.5/5.9.5/gcc_64/bin:$PATH"
export PATH="/opt/Qt5.9.5/Tools/QtCreator/bin:$PATH"
7、进入到安装路径
cd /opt/Qt5.9.5
8、进入图形卸载界面按照windows卸载软件一样uninstall即可
./MaintenanceTool
9、删除环境变量
参照第6步,打开文件,删除最后两行