… corat – coret …

Installing New QT (v4.5.2) on Ubuntu Hardy

Posted in Linux, Tricky, Ubuntu by luckyborneo on September 23, 2009

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.. ๐Ÿ˜€

Advertisements
Tagged with: , , , ,

6 Responses

Subscribe to comments with RSS.

  1. Mihir Patel said, on September 24, 2009 at 12:48 am

    Hello,

    It’s very nice New QT Installation. Very nice steps displayed by you.

    Thanks for sharing installation of QT. It’s really nice steps. It will helps to them who are beginner and wants to install New QT.

    Regards,
    Mihir
    ask4itsolutions.com

    • Luky said, on September 30, 2009 at 12:10 pm

      Hi Mihir Patel,

      Thank you very much, Sir. Your website is very usefull too. You explain more simple about Linux very well. I have to learn from you, Sir.

      Regards,
      Luky

  2. Chuong said, on October 26, 2009 at 8:06 am

    Hi Lucky,

    Thanks for the instructions. This really saves my lots of time. Otherwise I would have to upgrade to newer Ubuntu version to use newer QT environment.

    Chuong

    • Lucky said, on October 26, 2009 at 9:08 am

      Hi Chuong,

      You’re most welcome. It is good to know that my blog is very usefull for you. Looking forward for your comment again for the others articles. Have a nice programming.. ๐Ÿ˜‰

  3. Francisco said, on September 23, 2013 at 10:35 pm

    Hi Lucky!

    Thanks for the tutorial, but in mi pc with ubuntu hardy 8.04.4 doesn’t seems to work. I’m trying to instal but it throws me this error:

    make[3]: *** [.obj/debug-shared/qprintengine_ps.o] Error 1
    make[3]: Leaving directory `/home/reader/Desktop/qt-x11-opensource-src-4.0.1/src/gui’
    make[2]: *** [debug-all] Error 2
    make[2]: Leaving directory `/home/reader/Desktop/qt-x11-opensource-src-4.0.1/src/gui’
    make[1]: *** [sub-gui-make_default-ordered] Error 2
    make[1]: Leaving directory `/home/reader/Desktop/qt-x11-opensource-src-4.0.1/src’
    make: *** [sub-src-make_default-ordered] Error 2

    Any ideas??
    i’m trying to create a gui that show you a qwebview with python, but it says thatthere isn’t a qwebkit

    Best!

    • luckyborneo said, on July 30, 2014 at 4:48 pm

      Hi, Francisco
      I am really sorry about my late response. I am trully sorry that I cannot update this webpage. About your problem, perhaps you have missing package that require to install Qt.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: