简体   繁体   English

Qt5在OSX -qt-xcb上安装

[英]Qt5 install on OSX -qt-xcb

I am stuck with a problem installing Qt5 on OSX. 我在OSX上安装Qt5时遇到了问题。

The Qt Requirements for Mac OSX are done - Xcode and command line are installed. 完成Mac OSXQt要求 - 安装Xcode和命令行。 Then I followed the steps: 然后我按照步骤:

 # mkdir qt5
 # cd qt5
 # git clone git://gitorious.org/qt/qtbase.git
 # cd qt5
 # ./configure
 The test for linking against libxcb and support libraries failed!
 You might need to install dependency packages, or pass -qt-xcb.

Then I also tried 然后我也试过了

 # cd qtbase
 # ./configure -prefix $HOME/development/macosx/qt5  -nomake docs -nomake examples -nomake demos -nomake tests  -opensource -confirm-license -release -no-c++11
 Unknown part docs passed to -nomake.
 # ./configure
 The test for linking against libxcb and support libraries failed!
 You might need to install dependency packages, or pass -qt-xcb.

Some other links on related problems are: 关于相关问题的其他一些链接是:

Then Xquartz was also installed, supposing that the problem is because X11 is missing on OSX Mountain Lion, restarted the computer and tried the installation again. 然后还安装了Xquartz ,假设问题是因为OSX Mountain Lion上缺少X11,重新启动计算机并再次尝试安装。 It didn't solved the problem a bit. 它没有解决这个问题。

On Linux Qt5 installation was nice with no hustle. 在Linux Qt5安装很好,没有喧嚣。 But on OSX it doesn't work. 但是在OSX上它不起作用。

I hope someone can give any suggestions. 我希望有人可以提出任何建议。

I just encountered this same problem myself, and I worked around it by specifying the argument -no-xcb (instead of -qt-xcb) to the configure script. 我自己也遇到了同样的问题,我通过在configure脚本中指定参数-no-xcb(而不是-qt-xcb)来解决这个问题。 That allowed the compilation of the Qt libraries to complete (although some of the Qt example programs failed to compile... but it was enough to get me back on track for now). 这样就可以完成Qt库的编译(虽然有些Qt示例程序无法编译......但这足以让我现在回到正轨)。

I suspect this is a Mavericks-specific problem, as the same Qt source tarball (qt-everywhere-enterprise-5.2.0-src.tar.gz) compiled fine with the normal configure invocation under Mountain Lion. 我怀疑这是一个特定于Mavericks的问题,因为同样的Qt源代码tarball(qt-everywhere-enterprise-5.2.0-src.tar.gz)在Mountain Lion下正常配置调用时编译得很好。

This is nothing to do with Mavericks. 这与小牛队无关。 You have MacPorts or something similar in your PATH. 您的PATH中有MacPorts或类似的东西。 The configure script detects X-Windows and therefor tries to configure the xcb backend. 配置脚本检测X-Windows,因此尝试配置xcb后端。

Reset your PATH to a minimal one before compile: 在编译之前将PATH重置为最小值:

export PATH=/usr/bin:/bin:/usr/sbin:/sbin export PATH = / usr / bin:/ bin:/ usr / sbin:/ sbin

That will solve the issue. 这将解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM