关闭

QT5.6.0安装错误记录

标签: QT5-6-0
5966人阅读 评论(2) 收藏 举报
分类:

anzyelay@ubuntu:bin$ sudo lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
Codename: precise

一 使用源码安装

下载源码后执行出错如下:

1. ./configure时出错 The test for linking against libxcb and support libraries failed!

错误提示里叫你查看:qtbase/src/plugins/platforms/xcb/README
里面提示安装相应库,查看版本后安装
sudo apt-get install libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysym s1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-ic ccm4 libxcb-icccm4-dev libxcb-sync0 libxcb-sync0-dev libxcb-xfixes0-dev libx render-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0 libxcb-re nder-util0-dev libxcb-glx0-dev libxcb-xinerama0-dev
然后./configure正常

2. make 时出错,

make[3]: Entering directory `/home/anzyelay/Desktop/arm/qt-everywhere-opensource-src-5.6.0/qt3d/src/logic'
make[3]: Nothing to be done for `first'.
make[3]: Leaving directory `/home/anzyelay/Desktop/arm/qt-everywhere-opensource-src-5.6.0/qt3d/src/logic'
cd quick3d/quick3d/ && ( test -e Makefile || /home/anzyelay/Desktop/arm/qt-everywhere-opensource-src-5.6.0/qtbase/bin/qmake /home/anzyelay/Desktop/arm/qt-everywhere-opensource-src-5.6.0/qt3d/src/quick3d/quick3d/quick3d.pro -o Makefile ) && make -f Makefile 
/home/anzyelay/Desktop/arm/qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/features/qt_build_config.prf:45: Cannot write cache file /home/anzyelay/Desktop/arm/qt-everywhere-opensource-src-5.6.0/.qmake.super: Permission denied
/home/anzyelay/Desktop/arm/qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/features/qt_build_config.prf:50: Cannot write cache file /home/anzyelay/Desktop/arm/qt-everywhere-opensource-src-5.6.0/.qmake.super: Permission denied
Project ERROR: Unknown module(s) in QT: qml qml-private quick quick-private
make[2]: *** [sub-quick3d-core-make_first] Error 3
make[2]: Leaving directory `/home/anzyelay/Desktop/arm/qt-everywhere-opensource-src-5.6.0/qt3d/src'
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory `/home/anzyelay/Desktop/arm/qt-everywhere-opensource-src-5.6.0/qt3d'
make: *** [module-qt3d-make_first] Error 2

一般你用make -jN出的错不一定是真正出错的地方,先换回make 后查看出错点,出错如下,加入sudo 依然出相同的错误,只是少了Permission denied那几句,问题依旧,,寻找 中。。。。。
错误太多了,结合后面的估计是不虚拟机中的原装UBUNTU不支持3D显示之类的,议政没解决先考虑用离线包安装了。

二 使用离线包安装

由于在线安装下载速度太慢了,不能忍,所以使用离线包吧。

1. 使用离线包安装后运行qtcreator出错

anzyelay@ubuntu:Qt5.6.0$ ./Tools/QtCreator/bin/qtcreator
This application failed to start because it could not find or load the Qt platform plugin “xcb”
in “”.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.

Reinstalling the application may fix this problem.
Aborted (core dumped)

开始按百度的说法查找libqxcb.so库可以找到,修改LD_LIBRARY_PATH都没用,想想也是—离线包直接安装的配置这些应该都OK的,又不是源码编译安装的,况且qtcreator.sh这个本身就能配置参数运行,可问题依然。应该不是库文件找不到的问题。没办法我只能试着自己找了。,ldd查看其依赖库,发现“libEGL.so.1 => not found”

anzyelay@ubuntu:QtCreator$ ldd -d ./lib/Qt/plugins/platforms/libqxcb.so 
    linux-vdso.so.1 =>  (0x00007fff07fff000)
    libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007ff0e9d85000)
    libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007ff0e9ae7000)
    libQt5DBus.so.5 => /home/anzyelay/Qt5.6.0/Tools/QtCreator/./lib/Qt/plugins/platforms/../../lib/libQt5DBus.so.5 (0x00007ff0e9868000)
    libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007ff0e9666000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff0e945e000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007ff0e9168000)
    libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007ff0e8f5e000)
    libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007ff0e8d4d000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff0e8a17000)
    libEGL.so.1 => not found
    libQt5XcbQpa.so.5 => /home/anzyelay/Qt5.6.0/Tools/QtCreator/./lib/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5 (0x00007ff0e86bf000)
    libQt5Gui.so.5 => /home/anzyelay/Qt5.6.0/Tools/QtCreator/./lib/Qt/plugins/platforms/../../lib/libQt5Gui.so.5 (0x00007ff0e7ec7000)
    libQt5Core.so.5 => /home/anzyelay/Qt5.6.0/Tools/QtCreator/./lib/Qt/plugins/platforms/../../lib/libQt5Core.so.5 (0x00007ff0e77b5000)
    libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007ff0e754f000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff0e7331000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff0e7031000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff0e6d35000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff0e6b1e000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff0e6760000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007ff0e6536000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff0e631e000)
    libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007ff0e60da000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007ff0e5e9c000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff0e5c7e000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff0e5a7a000)
    libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007ff0e5877000)
    libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007ff0e5667000)
    libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007ff0e545f000)
    libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007ff0e5244000)
    libEGL.so.1 => not found
    libicui18n.so.56 => /home/anzyelay/Qt5.6.0/Tools/QtCreator/./lib/Qt/plugins/platforms/../../lib/libicui18n.so.56 (0x00007ff0e4da9000)
    libicuuc.so.56 => /home/anzyelay/Qt5.6.0/Tools/QtCreator/./lib/Qt/plugins/platforms/../../lib/libicuuc.so.56 (0x00007ff0e49f1000)
    libicudata.so.56 => /home/anzyelay/Qt5.6.0/Tools/QtCreator/./lib/Qt/plugins/platforms/../../lib/libicudata.so.56 (0x00007ff0e300e000)
    /lib64/ld-linux-x86-64.so.2 (0x00007ff0ea1db000)
    libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007ff0e2de8000)
    libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007ff0e2be5000)
    libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007ff0e29df000)
    libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007ff0e27c7000)
    libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007ff0e25c2000)
    libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007ff0e23b7000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff0e21b3000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff0e1fad000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007ff0e1da7000)
anzyelay@ubuntu:QtCreator$ sudo find / -name libEGL.so*

anzyelay@ubuntu:QtCreator$

于时我偿试安装输入sudo apt-get install libegl后 tab出来如下:

anzyelay@ubuntu:QtCreator$ sudo apt-get install libegl1-mesa
libegl1-mesa                          libegl1-mesa-drivers-lts-saucy
libegl1-mesa-dbg                      libegl1-mesa-drivers-lts-saucy-dbg
libegl1-mesa-dev                      libegl1-mesa-drivers-lts-trusty
libegl1-mesa-dev-lts-quantal          libegl1-mesa-drivers-lts-trusty-dbg
libegl1-mesa-dev-lts-raring           libegl1-mesa-lts-quantal
libegl1-mesa-dev-lts-saucy            libegl1-mesa-lts-quantal-dbg
libegl1-mesa-dev-lts-trusty           libegl1-mesa-lts-raring
libegl1-mesa-drivers                  libegl1-mesa-lts-raring-dbg
libegl1-mesa-drivers-dbg              libegl1-mesa-lts-saucy
libegl1-mesa-drivers-lts-quantal      libegl1-mesa-lts-saucy-dbg
libegl1-mesa-drivers-lts-quantal-dbg  libegl1-mesa-lts-trusty
libegl1-mesa-drivers-lts-raring       libegl1-mesa-lts-trusty-dbg
libegl1-mesa-drivers-lts-raring-dbg   
anzyelay@ubuntu:QtCreator$ sudo apt-get install libegl1-mesa

试着安装libegl1-mesa-dev需要先安装libegl1-mesa-drivers ,于是我就先安装libegl1-mesa-drivers ,然后搜索居然找到了libEGL.so.1 ,就不用安装其它的libegl1-mesa-*了。

anzyelay@ubuntu:QtCreator$ sudo find / -name libEGL.so*
/usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so.1.0
/usr/lib/x86_64-linux-gnu/mesa-egl/libEGL.so.1

偿试运行

anzyelay@ubuntu:QtCreator$ ./bin/qtcreator
file:///home/anzyelay/Qt5.6.0/Tools/QtCreator/share/qtcreator/welcomescreen/welcomescreen.qml:31:1: module "QtQuick" is not installed 
     import QtQuick 2.1 
     ^
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
Could not link shader program:
 ""

OK,上面的错误解决了,这回能弹出qtcreator黑框,但依然出来了新的错误也算是有点进步了。但退出终端后重新打开终端又出同样的问题,不过有点区别了

anzyelay@ubuntu:bin$ ./qtcreator
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Reinstalling the application may fix this problem.
Aborted (core dumped)

r后来发现原因是我修改了qtcreator同目录的qt.conf配置文件,还原

  1 [Paths]                                                                     
  2 Prefix=../lib/Qt
  3 Libraries=lib
  4 Plugins=plugins
  5 Imports=imports
  6 Qml2Imports=qml

再次运行还是出如下问题:

anzyelay@ubuntu:bin$ ./qtcreator
QOpenGLShader: could not create shader
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShaderProgram::uniformLocation( imageTexture ): shader program is not linked

为了解决上面的问题google后先后安装了如下

1955 sudo apt-get install libglu1-mesa-dev
1956 sudo apt-get install libgl1-mesa-dev

然后重启机子时无法启动图形界面了,一直卡在有个ubuntu的标识界面(下面有几个点点的图)
后来使用如下方法安装了这两个东西后重启就OK了,而且启动qtcrearot也成功了。
sudo apt-get install ubuntu-desktop xorg

找了半天没有解决的问题,就这么糊里糊涂地解决了。。。虽然OK 了,但哪位大神可以提点下下这是为什么?

0
0
查看评论

ubuntu编译安装qt5.0.1

参考:http://qt-project.org/forums/viewthread/23452 http://hi.baidu.com/houxn22/item/d652f29dec4a701f924f41a0 1、进入官网:http://qt-project.org/downloads下...
  • xiaoshi669
  • xiaoshi669
  • 2013-05-17 11:09
  • 6002

linux下编译qt5.6.0静态库——configure配置

转自:http://www.cnblogs.com/oloroso/p/5407779.html linux下编译qt5.6.0静态库 linux下编译qt5.6.0静态库 configure生成makefile 安装选项Configure选项第三方库:附加选项:QNX/Bl...
  • yuexiaxiaoxi27172319
  • yuexiaxiaoxi27172319
  • 2016-07-22 10:28
  • 3484

移植Qt5.7在开发板上运行Qt程序提示This application failed to start because it could not find or load the Qt platfo

./LinuxAGV This application failed to start because it could not find or load the Qt platform plugin "linux #eglfs" in "". A...
  • sfe1012
  • sfe1012
  • 2017-08-30 09:41
  • 526

QT程序打包发布

用两台虚拟机进行测试,其中一台为QT的开发机器,另外一台没有安装QT等相关程序的部署机。 (1)将依赖的包及相应的软连接拷贝到部署机的libqt目录下,并设定动态链接库的环境变量LD_LIBRARY_PATH,这些依赖包可以通过ldd命令查询 libGL.so.1.2.0、libicudata.so...
  • braveyly
  • braveyly
  • 2013-11-01 18:08
  • 19022

This application failed to start because it could not find or load the Qt platform plugin "xcb".

linux系统下Qt5编译好的程序在未安装Qt的系统下运行会报以下错误: This application failed to start because it could not find or load the Qt platform plugin "xcb". Re...
  • windows_nt
  • windows_nt
  • 2014-04-21 00:02
  • 49005

问题解决:it could not find or load the Qt platform plugin "windows"

迁移程序,运行exe时出错:"it could not find or load the Qt platform plugin "windows""的解决方法。
  • liyuefeilong
  • liyuefeilong
  • 2015-03-07 01:56
  • 23337

Qt5.7不能加载MySql驱动问题.(需要重新编译驱动)

首先贴上我遇到的问题,如下: QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QPSQL QPSQL7 Unable to open database 在...
  • qq_28851503
  • qq_28851503
  • 2016-09-03 11:40
  • 3171

[pyqt5]解决could not find or load the Qt platform plugin windows

在PyQt5+python3+pycharm开发环境配置时,遇到了This application failed to start because it could not find or load the Qt platform plugin "windows".的问题。导致...
  • a359680405
  • a359680405
  • 2015-04-16 16:49
  • 11051

This application failed to start because it could not find or load the Qt platform plugin "xcb" in "

我是在ipython 中输入 '%pylab'时报了如标题所示的错误。具体的解决方法如下: 1. 找到..../plugins/platforms/目录的位置:(我的是  /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms )...
  • tsinghuahui
  • tsinghuahui
  • 2017-04-18 15:34
  • 3658

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

安装的qtcreator 3.2.1 ,base on qt 5.3.2,明明支持quick了,直接编译源文件中的quick项目总是出这个错误。项目文件中肯定是加了quick qml了,检查下确实没问题,源项目也不会出错呀。。。。QT += quick qml应该是缺少相应的库,手动下载了各个库最终...
  • flfihpv259
  • flfihpv259
  • 2016-11-17 15:16
  • 3334
    个人资料
    • 访问:122214次
    • 积分:2045
    • 等级:
    • 排名:千里之外
    • 原创:85篇
    • 转载:5篇
    • 译文:0篇
    • 评论:20条
    文章分类
    最新评论