天天看點

ubuntu14源碼安裝qt

環境

Docker version 18.06.3-ce, build d7080c1

Linux c5e082c17dae 4.4.0-31-generic #50~14.04.1-Ubuntu SMP

QMake version 3.0 Using Qt version 5.2.1

先說下安裝流程

cd <path>/qt-everywhere-opensource-src-<version>
 ./configure -prefix /usr/local/qtbase -opensource -nomake tests
 make -j4
 make install
           

安裝qt遇到的問題

1 undefined reference to `JSC::Yarr::nondigitsCreate()’

未安裝python庫,或者python庫環境未配置好

2 Project ERROR: Unknown module(s) in QT: quick

apt-get install qtdeclarative5-dev
           

3 systemctl: command not found

apt-get install --reinstall systemd
           

4 The test for linking against libxcb and support libraries failed!

apt-get install libxcb* 
           

5 qmake: could not find a Qt installation of ‘’

  1. 删除原先的連結:

    sudo rm /usr/bin/qmake

  2. 建立新的連結:

    sudo ln -s 你的Qt qmake 的位置 /usr/bin/qmake

    即可,例如,我的

    Qt qmake

    的位置在

    /home/Qt5.4.0/5.4/gcc_64/bin/qmake

6 Warning: Disabling Linux Accessibility Bridge: DBus is missing.

apt-get install dbus-*dev