系统相关
首页 > 系统相关> > CentOS7中安装QT5.9.5

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

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"

 

标签:opt,ld,QT5.9,Qt5.9,5.9,CentOS7,so,conf,安装
来源: https://www.cnblogs.com/BASE64/p/14332282.html