3.5. Install Qt


        # for Qt, there is no "make install", just place the source
        # where you want it to live:
        cd /usr/local
        tar -xvzf qt-x11-2.2.4.tar.gz
        ln -s qt-2.2.4 qt
        cd qt
        

Read the INSTALL file about environment variables to setup before you try to build Qt. You can add the following to /etc/profile:


                QTDIR=/usr/local/qt
                PATH=$PATH:$QTDIR/bin
                MANPATH=$MANPATH:$QTDIR/man
                LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QTDIR/lib
                export QTDIR PATH MANPATH LD_LIBRARY_PATH
        
LD_LIBRARY_PATH is optional if you include an entry in /etc/ld.so.conf for the library path: /usr/local/qt/lib, then run ldconfig to update /etc/ld.so.cache.


        # note: configure has some options you can try, to see them
        # see ./configure --help
        ./configure

        # NOTE: when you run make as suggested on the next line, you may
        # encounter a make error that halts the build IF you run make
        # from outside X.  The program $QTDIR/bin/uic (the User Interface Compiler)
        # may Segmentation Fault when run from a Linux console.  You can run
        # "startx" and use the twm (tiny window manager) and xterm (or whatever you
        # might have setup for X) to run the rest of the Qt build.  If for some
        # reason twm is not even available, then you can run "XFree86 &", use
        # "CTRL-ALT-F1" to get to a console, start an xterm as
        #  "xterm -display localhost:0.0 &", then switch back to X with "ALT-F7".

        make

    # Only for old versions of Qt before 2.1.0 or so ...
        # compile the opengl extension
        # Note that in qt 2.2.0 on, the OpenGL support has been moved out of extensions
        # and is now a standard part of the library that is installed if configure
        # finds OpenGL installed on your system.  If you were to not want OpenGL
        # support in Qt, you'd have to pass the -no-opengl option to configure.
        cd extensions/opengl/src
        # Check the Makefile and ensure there are not Mesa references.
        make


        ldconfig
        cd ../examples
        # Try compiling and running the examples.