• Qt安装过程中: configure 时发生的经典出错信息之”Basic XLib functionality test failed!”(Z..z..) 之 MySQL support cannot be enabled due to functionality test!


    整出错信息是在./configure阶段
    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 /home/zhu/Qt/qt-x11-opensource-src-4.5.2/mkspecs/linux-g++

    还是老办法,以不变应万变。进入文件夹config.test / x11/xlib 执行make命令,看出错信息
    g++ -Wl,-O1 -o xlib xlib.o    -L/usr/X11R6/lib -lXext -lX11 -lm
    /usr/bin/ld: cannot find -lXext
    看到了吧,g++在/usr/X11R6/lib下,找不到libXext.so呢。

    其原因就在于需要安装libX11的开发包,在ubuntu/debian里包名都是libX11-dev
    根据以往的经验,在./configure前主动装好下面3个包,基本上就万事大吉了
    sudo apt-get install libX11-dev libXext-dev libXtst-dev

    以下重点:

    其它的如发生ODBC functionality test failed! 的 错误

    进入文件夹config.tests/unix/odbc执行make命令,看出错信息

    jg@localhost:~/tools/qt/qt-everywhere-opensource-src-4.8.7/config.tests/unix/odbc$ make
    g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/linux-g++ -I. -o odbc.o odbc.cpp
    odbc.cpp:45:17: fatal error: sql.h: 没有那个文件或目录
    #include <sql.h>
    ^
    compilation terminated.
    Makefile:181: recipe for target 'odbc.o' failed
    make: *** [odbc.o] Error 1

    接着百度查询“odbc.cpp:45:17: fatal error: sql.h: 没有那个文件或目录”得到

    DTL使用中遇到的sql.h无法找到的解决过程https://blog.csdn.net/coder_xia/article/details/6746166

    1. sudo apt-get install unixodbc  
    2. sudo apt-get install unixodbc-dev 

    然后再在config.tests/unix/odbc执行make命令,信息

    jg@localhost:~/tools/qt/qt-everywhere-opensource-src-4.8.7/config.tests/unix/odbc$ make
    g++ -c -pipe -O2 -Wall -W -I../../../mkspecs/linux-g++ -I. -o odbc.o odbc.cpp
    g++ -Wl,-O1 -o odbc odbc.o -lodbc

    说明成功了。

     在unix文件夹下的目录有

    注意:此处进入文件夹执行make看出错信息的查错方法非常好,学习

    转自:https://blog.csdn.net/neu_sunlei/article/details/5524384

     发生 MySQL support cannot be enabled due to functionality test!错误

    一般是源问题或者libmysqlclient-dev等相关库没装。JG 使用的debian8.9虚拟机是因为源问题(采用了zkty的补丁包之后有问题。可以先替换回原装的source.list)。

    注:其它类似 ****** support cannot be enabled due to functionality test!的问题基本是相关库没装,这时候有些可以采用前面的方法,有些可以直接baidu一下需要安装的库即可,有些通过sudo apt-cache search ****  查找相关的lib****-dev的库

    就可以安装libfontconfig1-dev

    其它:

    #./configure -phonon

    但这时候,可能会提示以下内容,

    Phonon support cannot be enabled due to functionality tests 

    解决办法:

    先下载必要的包:

    sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev

    opengl需要
    $ sudo apt-get install xlibmesa-gl-dev libglu1-mesa-dev

    下面的为gstreamer需要使用的头文件等
    sudo apt-get install libglib2.0-dev
    sudo apt-get install libgstreamer0.10-dev
    sudo apt-get install libgstreamer-plugins-base0.10-dev
    sudo apt-get install libxml-dev  (无法)

    安装各类需要使用到的开发包
    sudo apt-get install xorg-dev

    sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev

    转自:http://www.voidcn.com/article/p-vrfatqqd-xh.html

    注意:以上查错的原则是先用1、sudo apt-cache search *** 查找是否有相关lib***-dev的库,有则直接安装,不行则使用2、看unix文件夹下面是否有直接的文件夹,有则进入执行make ,然后根据make的错误信息百度查找该安装什么库,再不行则3、直接复制错误百度喽

  • 相关阅读:
    扫面线模板
    (动态规划、栈)leetcode 84. Largest Rectangle in Histogram, 85. Maximal Rectangle
    tmux 常见命令汇总
    leetcode 221
    leetcode 319 29
    (贪心)leetcode 392. Is Subsequence, 771. Jewels and Stones, 463. Island Perimeter
    leetcode 982 668
    Python import 同文件夹下的py文件的函数,pycharm报错
    Windows里Anaconda-Navigator无法打开的解决方案
    Windows下 gpu版 Tensorflow 安装
  • 原文地址:https://www.cnblogs.com/liushui-sky/p/9223086.html
Copyright © 2020-2023  润新知