1. Download the Qt online installation package
address: Index of /official_releases/online_installers
Select the Linux version, right click and copy the link address.
In the Ubuntu terminal, use the download command (wget) to download the file
#wget https://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run
2. Install QT
and use commands to increase executable permissions
#chmod +x qt-unified-linux-x64-online.run
Execute the online installer./qt-unified-linux-x64-online.run
Execution error, error message: ./qt-unified-linux-x64-online.run: error while loading shared libraries: libxcb-xinerama.so.0: cannot open shared object file: No such file or directory, to be displayed during installation An installation interface, missing dependent libraries.
Install the missing libraries, and directly install the xcb related libraries.
#sudo apt-get install libxcb*
Then execute the installation program, the following installation interface will appear
Enter your Email and password, if you don't have one, you can register one. Click Next
Check the protocol and select Next.
At this step, the following problems may occur:
Warning: Network error while downloading 'https://mirrors.xxx.xxx.xxx/qt/qtsdkrepository/linux_x64/android/qt6_dev_x86_64_insighttracker/Updates.xml?412727157': Error transferring https://mirrors.xxx.xxx.xxx/qt/qtsdkrepository/linux_x64/android/qt6_dev_x86_64_insighttracker/Updates.xml?412727157 - server replied: Not Found.
Reason: There is a problem with the image source, just switch it.
Use the following command to install:
./qt-unified-linux-x64-online.run --mirror https://mirrors.tuna.tsinghua.edu.cn/qt
The Tsinghua image source used here.
Click Next.
Choose one and click Next.
Select an installation path, select Custom installation (customized installation), click Next.
Select Qt 5.15.2, select the installed tools according to your needs, and click Next.
Tick to agree to the agreement, select Next.
Click Install.
Start the installation, wait for the installation progress bar to reach 100%, click Next.
Click Finished. The installation is complete. ( If you need QT dependencies during the installation of CST, you can go to this step!)
3. Qt configuration
After entering the installation directory, you can see the directory as follows:
Add the following information at the end of the /etc/profile file:
export PATH=/opt/Qt/5.15.2/gcc_64/bin:$PATH
export PATH=/opt/Qt/Tools/QtCreator/bin:$PATH
Then restart the computer #reboot
You will see the Qt Creator icon in the Application, you can right-click the icon and select Add to favorite, and it will be displayed in the vertical column on the left.
Click the icon to start Qt Creator, but there is no response.
Execute in terminal to see what error occurs.
It turns out that the version of libc.so.6 is wrong. The version of Qt Creator is not compatible with Ubuntu 18.04, and the upgrade of libc.so.6 is very troublesome. If you want to use Qt Creator, then install a version 5.0.0 of QtCreator.
4. Install Qt Creator 5.0.0.
download link:
wget https://download.qt.io/official_releases/qtcreator/5.0/5.0.0/qt-creator-opensource-linux-x86_64-5.0.0.run
Execute #chmod +x qt-creator-opensource-linux-x86_64-5.0.0.run
Execute the installation
It's relatively simple, just go to Next all the way.
After installation, you can see it in the Application, click the icon.
Don't forget to change the above configuration
Note off the PATH of QtCreator.