【1】下載下傳QT-4.5.3
【2】tar vxfz qt-x11-opensource-src-4.5.3.tar.gz
【3】configure
cd /tmp/qt-x11-opensource-src-4.5.3
./configure -prefix /opt/qt-4.5.3
【4】make
【5】make install
這是通常的安裝步驟。但是在第3步時會有以下問題:
(1)Do you accept the terms of either license? yes
Creating qmake. Please wait...
g++
-c -o project.o -m64 -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators
-Igenerators/unix -Igenerators/win32 -Igenerators/mac
-I/tmp/qt-x11-opensource-src-4.5.3/include
-I/tmp/qt-x11-opensource-src-4.5.3/include/QtCore
-I/tmp/qt-x11-opensource-src-4.5.3/src/corelib/global
-I/tmp/qt-x11-opensource-src-4.5.3/src/script -DQT_NO_PCRE
-DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC
-DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS
-I/tmp/qt-x11-opensource-src-4.5.3/mkspecs/linux-g++-64
-DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT
project.cpp
make: g++:指令未找到
make: *** [project.o] 錯誤 127
解決方法:
aptitude install g++
(2)。。。。。。
qscriptextvariant.o
qscriptcontext.o qscriptfunction.o qscriptgrammar.o qscriptlexer.o
qscriptclassdata.o qscriptparser.o qscriptprettypretty.o
qscriptsyntaxchecker.o qscriptvalue.o qscriptvalueimpl.o
qscriptvalueiterator.o qscriptvalueiteratorimpl.o qscriptclass.o
qscriptclasspropertyiterator.o qscriptengineagent.o qscriptcontextinfo.o
qscriptstring.o -m64
Basic XLib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /tmp/qt-x11-opensource-src-4.5.3/mkspecs/linux-g++-64.
#sudo apt-get install libx11-dev libfreetype6-dev libavahi-gobject-dev libsm-dev libxrender-dev libfontconfig-dev libxext-dev
(感謝博文http://blog.chinaunix.net/space.php?uid=114431&do=blog&id=2874114給了我幫助。)
安裝了這些依賴包之後,後面的安裝就會很順利。