wsl环境下搭建QT12.6开发环境[QT无界面命令行安装]

wsl环境下qt12.6的安装

qt512-ppa源地址
命令行安装

sudo add-apt-repository ppa:beineri/opt-qt-5.12.6-bionic
sudo apt-get update
sudo apt install qt512-meta-full
source /opt/qt512/bin/qt512-env.sh

若执行add-apt-repository ppa:beineri/opt-qt-5.12.6-bionic报错,无法添加ppa源,则

vim /etc/apt/sources.list

在末尾添加

deb http://ppa.launchpad.net/beineri/opt-qt-5.12.6-bionic/ubuntu bionic main 
deb-src http://ppa.launchpad.net/beineri/opt-qt-5.12.6-bionic/ubuntu bionic main 

然后再执行

sudo apt-get update
sudo apt install qt512-meta-full
source /opt/qt512/bin/qt512-env.sh

便可以完成qt5.12的安装

你可能感兴趣的:(C++)