Installing New QT (v4.5.2) on Ubuntu Hardy

qt-logoIf you want to make a program based on graphical, try to use QT Program. This software is multiplatform. You can install it on Windows, Mac OSX, Solaris and Linux Machine. On Ubuntu, you can install it with this command from your terminal (Applications > Accessories > Terminal):
For Qt versi 3:
$ sudo apt-get install qt3-dev-tools

For Qt versi 4:
$ sudo apt-get install qt4-dev-tools

But, if you want to install the new one, you have to follow this instruction.
1. Open your terminal (Applications > Accessories > Terminal)
2. Download QT from this site – http://qt.nokia.com/downloads .. just download what you need. This time, I just need Framework Only (library).
$ wget http://get.qt.nokia.com/qt/source/qt-x11-opensource-src-4.5.2.tar.gz
3. Unpack the tarball:
$ tar -zxvf qt-x11-opensource-src-4.5.2.tar.gz
4. Enter the directory:
$ cd qt-x11-opensource-src-4.5.2
5. Prepare your coffee/milk/tea/cookies/food/coke etc.. because this will take a looooong time to compile.. 😀
$ ./configure && make && sudo make install

If you want to use the new QT, you have to execute this command to set up the environment. Just open the terminal then type this command:
export QTDIR="/usr/local/Trolltech/Qt-4.5.2"
export PATH="/usr/local/Trolltech/Qt-4.5.2/bin:/usr/local/Trolltech/Qt-4.5.2/bin:${PATH##/usr/local/Trolltech/Qt-4.5.2/bin:/usr/local/Trolltech/Qt-4.5.2/bin:}"
export LD_LIBRARY_PATH="/usr/local/Trolltech/Qt-4.5.2/lib:/usr/local/Trolltech/Qt-4.5.2/lib:${LD_LIBRARY_PATH##/usr/local/Trolltech/Qt-4.5.2/lib:/usr/local/Trolltech/Qt-4.5.2/lib:}"

If you want to always use this environment, you can make the simple script or you can put them on the bashrc file. That’s it, now you have learn how to install the program from source (tarball). Nice job, dude.. 😀

Lucky Borneo

Lucky is lucky, just lucky.