使用麒麟linux系统
查看计算机架构
使用下面的命令
lscpu
安装cmake
下载cmake的arm64版本
tar xzvf cmake-3.28.0.tar.gz
mv cmake-3.28.0-linux-aarch64 /opt/cmake-3.28
ln -sf /opt/cmake-3.28/bin/* /usr/bin
验证是否安装成功
cmake --version
查看gcc有没有安装
输入下面指令
aarch64-linux-gnu-
然后按两次tab键 会看到有一个表,表示计算机安装好aarch64-linux-gnu-g++
没有的话,使用
sudo apt-cache search aarch64
安装QT
使用qt源码安装,需要写一个sh脚本,命名为autoConfigure.sh
可以使用
vim autoConfigure.sh
#!/bin/bash
./configure -prefix /home/admin123/qt5.15.2_ARM \
-opensource \
-confirm-license \
-skip qtlocation \
-nomake examples \
-nomake tests \
-xplatform linux-aarch64-gnu-g++ \
-debug \
-no-opengl \
提高权限
chmod 777 autoConfigure.sh
运行sh脚本
sudo ./autoConfigure.sh
开始make
sudo make -j4
安装
sudo make install