ubuntu 编译安装Qt

1. 安装需要的包
sudo apt -get install libfontconfig1 -dev libfreetype6 -dev libx11 -dev libxcursor -dev libxext -dev libxfixes -dev libxft -dev libxi -dev libxrandr -dev libxrender -dev

2. 错误解决:
g++: error: unrecognized command line option '-fuse-ld=gold', 即在编译wetkit时遇到这个错误了, 没想到这个BUG还没有除去,

 解决办法如下: src/3rdparty/webkit/Source/common.pri,屏蔽QMAKE_LFLAGS+=-fuse-ld=gold,即注释这个选项就可以了。

//////////////
ubuntu10.04编译安装QT可能出现的问题和解决办法
2010-06-21 14:13
./configure --prefix=/usr
如出现
Basic XLib functionality test failed!
则先安装libxext-dev
sudo apt-get install libxext-dev

mark时出现
/usr/bin/ld: cannot find -lXext
则需安装libxt-dev
sudo apt-get install libxt-dev

mark时出现
/usr/bin/ld: cannot find -lXrender
则需安装libxrender-dev
sudo apt-get install libxrender-dev

出现
X11/extensions/Xdamage.h: No such file or directory
则安装 libxdamage-dev
sudo apt-get install libxdamage-dev

About QtOpenGL
If try -opengl then: All the OpenGL functionality tests failed!
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev

About QtDBus
If try -dbus then:The QtDBus module cannot be enabled because libdbus-1 version 0.93 was not found
sudo apt-get install libdbus-1-dev
sudo apt-get install libedbus-dev


gconf
sudo apt-get install libgconf2-dev

icu
sudo apt-get install libicu-dev


All above command is:
sudo apt-get install libxext-dev libxt-dev libxrender-dev libxdamage-dev libgl1-mesa-dev libglu1-mesa-dev libdbus-1-dev libgconf2-dev libicu-dev libedbus-dev

你可能感兴趣的:(ubuntu 编译安装Qt)