./configure -developer-build -opensource -nomake examples -nomake tests
但是它失败了这个错误:
Running configuration tests... The test for linking against libxcb and support libraries Failed! You might need to install dependency packages,or pass -qt-xcb. See src/plugins/platforms/xcb/README.
即使已经安装了libxcb1-dev,我也收到这个错误.
还有一个类似的问题,您可以看一下它,以供参考 – Qt5 install on OSX -qt-xcb,但它是关于OS X,并且建议的解决方案将不适用于Linux我认为.
解决方法
错误消息中提到的README还列出了Ubuntu和Fedora的软件包,因此如果以下依赖关系无法帮助,请检查这两个位置之一.
或者,您可以尝试“-qt-xcb”标志.根据上述页面,这只是构建一些库,而不是与系统库链接.
Debian的:
libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev
Ubuntu的:
libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync0 libxcb-sync0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-glx0-dev
Fedora的
libxcb libxcb-devel libXrender libXrender-devel xcb-util-wm xcb-util-wm-devel xcb-util xcb-util-devel xcb-util-image xcb-util-image-devel xcb-util-keysyms xcb-util-keysyms-devel