中标麒麟v5安装qt512.12开发软件
注意 需要联网操作
遇到问题1:yum提示没有可用软件包问题 终端执行如下命令
CentOS7将yum源更换为国内源保姆级教程
中标麒麟V7-yum源的更换(阿里云源)
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sed -i 's/$releasever/7/g' /etc/yum.repos.d/CentOS-Base.repo
yum clean all
yum makecache
sudo yum update (sudo yum update --skip-broken)
安装qt
sudo chmod -X qt-opensource-linux-x64-5.12.12.run
./qt-opensource-linux-x64-5.12.12.run
中标麒麟6安装Qt 4.8.4+QtCreator 2.7.0 NeoKylin Linux Desktop Release 6+Qt4.8.4+QtCreator2.7.0
中标麒麟7.0安装QT 5.12.4见招拆招
中标麒麟V7安装Qt5.13.0
遇到问题2:安装qt提示缺少G++
1、查看gcc版本
2、离线安装对应版本的gcc-c++
安装包下载链接:
https://vault.centos.org/6.5/os/x86_64/Packages/#
https://github.com/gcc-mirror/gcc/archive/refs/tags/releases/gcc-4.8.5.tar.gz
gcc4.8.5版本安装,gcc版本升级
Tags · gcc-mirror/gcc · GitHub
rpm -ivh gcc-c++-4.8.5-44.el7.x86_64.rpm --nodeps --force
遇到问题3:安装qt提示缺少libbus
1、如果离线安装,请下载如下安装包
安装包下载链接:
https://dbus.freedesktop.org/releases/dbus/
dbus-1.10.24-15.el7.x86_64.rpm
2、如果在线安装,请执行如下命令
yum install dbus.x86_64 --skip-broken
遇到问题4:安装qt提示FT_Get_Font_Format
1、如果离线安装,请下载如下安装包
安装包下载链接:
Index of /releases/freetype/
freetype-2.8-14.el7_9.1.x86_64.rpm
2、如果在线安装,请执行如下命令
yum install freetype
遇到问题5:运行qt项目报错
/opt/Qt5.12.12/5.12.12/gcc_64/include/QtCore/qglobal.h:45: error: type_traits: No such file or directory
In file included from /opt/Qt5.12.12/5.12.12/gcc_64/include/QtGui/qtguiglobal.h:43:0,
from /opt/Qt5.12.12/5.12.12/gcc_64/include/QtWidgets/qtwidgetsglobal.h:43,
from /opt/Qt5.12.12/5.12.12/gcc_64/include/QtWidgets/qmainwindow.h:43,
from /opt/Qt5.12.12/5.12.12/gcc_64/include/QtWidgets/QMainWindow:1,
from ../untitled/mainwindow.h:4,
from ../untitled/mainwindow.cpp:1:
/opt/Qt5.12.12/5.12.12/gcc_64/include/QtCore/qglobal.h:45:25: fatal error: type_traits: No such file or directory
# include <type_traits>
1、如果在线安装,请执行如下命令
sudo yum install libGL --skip-broken
sudo yum install libGL-devel
sudo yum install libGLU-devel
sudo yum install freeglut
sudo yum install libstdc++
sudo yum install cmake
vim ~/.bashrc