Qt

우분투 12.10에서 Qt 5.0 Install

siwall 2013. 2. 18. 09:50

http://2buntu.com/1267/how-to-install-qt-50-on-ubuntu-1210/

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 with cd /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?