Ubuntu13.04环境下安装Qt5.1.1

下载:http://qt-project.org/


1.设置权限

        sudo chmod a+x qt-linux-opensource-5.1.1-x86_64-offline.run

2.安装

       sudo ./qt-linux-opensource-5.1.1-x86_64-offline.run

      傻瓜式安装下去



3.环境变量配置

     sudo gedit .bashrc

    在最后添加

         /home/ubuntu/是安装Qt的文件夹

        export QTDIR=/home/ubuntu/Qt5.1.1/5.1.1/gcc
        export PATH=$QTDIR/bin:$PATH
        export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PAH
        export QMAKESPEC=$QTDIR/mkspecs/linux-g++
       set nu
       alias qtcreator='/home/ubuntu/Qt5.1.1Tools/QtCreator/bin/qtcreator'
       alias qtdesigner='/home/ubuntu/Qt5.1.1/5.1.1/gcc/bin/designer'
       alias qtassistant='/home/ubuntu/Qt5.1.1/5.1.1/gcc/bin/assistant'

       export PATH=./:$PATH

4.重新打开Qt Creator即可



出现的问题:

:cannot find -lgl

安装:

apt-get install libgl1-mesa-dev


你可能感兴趣的:(qt,ui)