Install Qt in centos

Source: Internet
Author: User
Tags gz file

During the weekend after May Day, it took two days to install QT. After installation, I recorded the ups and downs. My system is centtos5.5.
Specific installation methods:
1. GoFtp://ftp.qt.nokia.com/qt/sourceDownload QT 4.5.3 for X11 opensource.


2. Download The qt-x11-opensource-src-4.5.3.tar.gz file, we use the tar command to decompress it.

Tar zxvf qt-x11-opensource-src-4.5.3.tar.gz

3. Move the directory to the/usr/local directory, or put the directory in/home or other directories. The following installation process is to move this directory to the/usr/local directory and change it to QT. If you have not moved it, pay attention to the directory when setting it.


4. Modify (availableVI editor or gedit. bash_profile or. profile or/etc/profile file, such as: # vi/root /. bash_profile or # vi. bash_profile or # vi/etc/profile or # vi. profile

Add the followingCode:

Qtdir =/usr/local/QT
Path = $ qtdir/bin: $ path
Manpath = $ qtdir/MAN: $ manpath
LD_LIBRARY_PATH = $ qtdir/lib: $ LD_LIBRARY_PATH
Export qtdir path manpath LD_LIBRARY_PATH

5. log out of the user or click # source/root/. bash_profile to make the configuration file take effect. If Step 1 is # vi. bash_profile, it should be: # source. bash_profile, and so on.

 

6. EnterQtDirectory to start Compilation

./Configure

Enter yes to agree to the GPL/qpl protocol.
You can also see the command./configure-thread on the network. To support multithreading, you should try these commands .. I have tried the/configure-thread and./configure commands, but they are not repeated. The./configure-thread running time is much shorter than./configure.

After running./configure, the following prompt is displayed:

 

QT is now configured for building. Just run 'gmake '.
Once everything is built, you must run 'gmake install '.
Qt will be installed into/usr/local/trolltech/Qt-4.5.3

To reconfigure, run 'gmake confclean' and 'configure '.

 

7. Start make. It takes a long time for me to start from noon until the next day.

Make
Based on the prompt after 6th runs the command./configure, you can enter the following command:

Gmake (I use this command)

 

8. Start install (If some manuals on the Internet do not have this step, the error while loading shared libraries: libqtdesignercomponents. sulfate error may occur. After I make install it, it will be OK.This step also takes a long time. It took my machine more than an hour.

Make install

Based on the prompt after 6th runs the command./configure, you can enter the following command:
Gmake install (I use this command)

9. Go to the QT directory, enter the bin directory, and run./designer. You can see the graphic interface.

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.