ubuntu18.04如何安装qt5.12
时间: 2023-06-05 19:47:28 浏览: 1390
在Ubuntu 18.04上安装Qt 5.12无需太多复杂的操作,只需要执行以下命令即可完成:
1. 首先,更新软件包列表并安装sudo包:
sudo apt update
sudo apt install sudo
2. 接下来,安装Qt 5.12所需的依赖项:
sudo apt install build-essential libgl1-mesa-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev libfontconfig1-dev libdbus-1-dev libssl-dev libgstreamer-plugins-base1.0-dev libsqlite3-dev libx11-xcb-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-render0-dev libxcb-xinput0-dev libxcb-xtest0-dev libxcb-xevie0-dev libxcb-cursor-dev libxi-dev libxcb-xkb-dev libxrender-dev libxcb-shape0-dev libxcb-xinerama0-dev libxcb-util-dev libxrandr-dev libxcb-xrm-dev libxcb-present-dev libsm-dev libpulse-dev libicu-dev libudev-dev libmysqlclient-dev libpq-dev libldap2-dev libavformat-dev libavcodec-dev libavutil-dev libavfilter-dev libswscale-dev libcc1-0-dev libsctp-dev zlib1g-dev
3. 在安装依赖项后,下载Qt 5.12的在线安装程序:
wget https://download.qt.io/official_releases/qt/5.12/5.12.0/qt-opensource-linux-x64-5.12.0.run
4. 接下来,使用chmod命令将下载的文件转换为可执行文件:
chmod +x qt-opensource-linux-x64-5.12.0.run
5. 最后,运行可执行文件进行安装:
./qt-opensource-linux-x64-5.12.0.run
根据提示安装过程即可完成Qt 5.12的安装。在安装完成后,您可以通过在命令行中键入“qmake -v”命令来验证已安装的Qt版本。
阅读全文