How to Install Qt 5.0 on Ubuntu 12.10

简介: Well folks, today Digia has made a very special announcement - Qt 5.0 has been released! This is very exciting considering that it has been 7 years since Qt 4.

Well folks, today Digia has made a very special announcement - Qt 5.0 has been released! This is very exciting considering that it has been 7 years since Qt 4.0 was released. So what's new in this release? This pagegoes into detail on the new features so I won't waste time pasting them here. Here are just a couple things to whet your appetite:

  • A brand new hardware accelerated graphics engine.
  • Native support for parsing and generating JSON.

Now, the next question becomes... how do we install this in Ubuntu since the latest version in the Quantal repositories is 4.8.3? I'm glad you asked.

Sadly, I have been unable to find a PPA with the final released version of Qt 5.0. So we will have to build it ourselves. Warning: you need a lot of disk space. Just the source code alone is about 650 MB before building.

Begin by opening a terminal and running these commands:

sudo apt-get install build-essential perl python "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev flex bison gperf libicu-dev libxslt-dev ruby libcups2-dev libgstreamer-plugins-base0.10-dev libssl-dev libpulse-dev libasound2-dev libgtk2.0-dev
wget http://releases.qt-project.org/qt5/5.0.0/single/qt-everywhere-opensource-src-5.0.0.tar.gz
tar -xf qt-everywhere-opensource-src-5.0.0.tar.gz
cd qt-everywhere-opensource-src-5.0.0

Just a quick note to explain what's happening here: basically we're installing the packages we need for building Qt and downloading / extracting the source archive. Feel free to prefix the commands above withcd /tmp if you don't want a bunch of temporary files cluttering up your hard drive when you're done.

Now for the fun part - actually compiling the library. This isn't really as bad as it sounds. The first step is to use the ./configure command to indicate exactly what we want built and how (this will take about one or two minutes):

./configure -opensource -confirm-license -release -nomake tests -nomake examples -nomake demos

There are quite a few options. Here is the complete list as obtained from ./configure --help. In this case, we are skipping debug information (since it uses up even more disk space) and we're not building the examples or demos.

The actual build takes place with this command:

make -j3

Now go make yourself a cup of coffee. This will take some time to complete (a couple of hours on a fast machine). Once the process completes successfully, you can install all of the newly compiled files by running:

sudo make install

That's it! That wasn't so bad, was it?

相关文章
|
Ubuntu Windows
Qt开发笔记之编码h264码流并封装mp4(六):ubuntu平台编译mp4v2并封装mp4
Qt开发笔记之编码h264码流并封装mp4(六):ubuntu平台编译mp4v2并封装mp4
Qt开发笔记之编码h264码流并封装mp4(六):ubuntu平台编译mp4v2并封装mp4
|
NoSQL MongoDB Docker
Ubuntu18 Install MongoDB
Ubuntu18 Install MongoDB
126 0
|
Ubuntu Linux Windows
qt6.5 download for kali/ubuntu ,windows (以及配置选项选择)
qt6.5 download for kali/ubuntu ,windows (以及配置选项选择)
270 0
qt6.5 download for kali/ubuntu ,windows (以及配置选项选择)
|
Ubuntu 数据库 C++
百度搜索:蓝易云【【嵌入式Qt开发入门】在Ubuntu下编写C++教程。】
请注意,这只是一个入门教程,Qt开发涉及到更广泛的主题和概念,例如信号与槽机制、界面设计、数据库操作等。建议参考Qt官方文档和教程,以深入了解和掌握嵌入式Qt开发。
286 0
|
Ubuntu Linux Windows
Install KDE Plasma and XRDP on Ubuntu Server
Install KDE Plasma and XRDP on Ubuntu Server
465 0
Install KDE Plasma and XRDP on Ubuntu Server
|
Ubuntu
how to install xlsx in R on ubuntu?
how to install xlsx in R on ubuntu?
187 0
|
Ubuntu Unix Linux
Qt+MPlayer音乐播放器开发笔记(一):ubuntu上编译MPlayer以及Demo演示
Qt+MPlayer音乐播放器开发笔记(一):ubuntu上编译MPlayer以及Demo演示
Qt+MPlayer音乐播放器开发笔记(一):ubuntu上编译MPlayer以及Demo演示
|
Ubuntu 编译器 Windows
Qt开发笔记之编码h264码流并封装mp4(五):ubuntu平台编译x264
Qt开发笔记之编码h264码流并封装mp4(五):ubuntu平台编译x264
Qt开发笔记之编码h264码流并封装mp4(五):ubuntu平台编译x264
|
Ubuntu Shell 计算机视觉
Qt实用技巧:ubuntu发布程序打包流程(解决插件xcb加载失败)
Qt实用技巧:ubuntu发布程序打包流程(解决插件xcb加载失败)
Qt实用技巧:ubuntu发布程序打包流程(解决插件xcb加载失败)
下列软件包有未满足的依赖关系: cmake-qt-gui : 依赖: cmake (= 3.10.2-1ubuntu2) E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依
下列软件包有未满足的依赖关系: cmake-qt-gui : 依赖: cmake (= 3.10.2-1ubuntu2) E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依
858 0
下列软件包有未满足的依赖关系: cmake-qt-gui : 依赖: cmake (= 3.10.2-1ubuntu2) E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依