Install qt4.8 on CentOS

Source: Internet
Author: User
Record the process of installing qt48 in CentOS: (it is best to install it in an English system language environment, and the Chinese character may be incorrect.) 1 installation

Record the process of installing qt4.8 in CentOS:

(It is best to install it in an English system language environment. Chinese characters may be incorrectly formatted)

1. install the required environment

Install gcc and g ++:

[root@localhost local]# yum install gcc
[root@localhost local]# yum install gcc-c++
Install Xlib:
[root@localhost local]# yum install libX11-devel libXext-devel libXtst-devel
2. Download qt

Official website: http://qt-project.org/downloads.

CentOS installation and selection

  • Qt libraries 4.8.5 for Linux/X11 (230 MB) (Info) 3. decompress the downloaded qt
    [root@localhost local]# tar zxvf qt-everywhere-opensource-src-4.8.5.tar.gz
    4. configure
    [root@localhost local]# ./configure --prefix=/usr/local

    I chose to install it in/usr/local. when configuring the environment, remember to change it to your own directory.

    5. compile and run

    This step may take a long time and requires patience.

    [root@localhost local]# gmake
    [root@localhost local]# gmake install
    6. the installation is successful and environment variables are configured.

    Write the installation path to the environment variable

    [root@localhost local]# vim /etc/profile
    Add the following content:
    #ADD QT4.8.5 PATHPATH=/usr/local/bin:$PATHexport PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTTRC
    Make the configuration take effect
    [root@localhost bin]# source /etc/profile
    7. the configuration is successful! Open the qt interface for programming!

    Go to the qt installation directory/bin folder and run

    [root@localhost bin]# ./designer
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.