4

I'm trying to install a program and i used the following command:

./configure

But, an error occurred:

    checking for Qt... configure: error: Qt (>= Qt 3.2) (headers and libraries) not found. Please check your installation!

Config.log file:

    configure:28268: checking for Qt
configure: 28333: /usr/include/qt4/qstyle.h
configure: 28333: /usr/lib/qt3/include/qstyle.h
configure: 28333: /usr/lib/qt3/qstyle.h
configure: 28333: /usr/lib/qt/include/qstyle.h
configure: 28333: /usr/lib/qt/qstyle.h
configure: 28333: /usr/share/qt3/include/qstyle.h
configure: 28333: /usr/share/qt3/qstyle.h
configure: 28333: /usr/local/qt/include/qstyle.h
configure: 28333: /usr/include/qt/qstyle.h
configure: 28333: /usr/include/qstyle.h
configure: 28333: /usr/X11R6/include/X11/qt/qstyle.h
configure: 28333: /usr/X11R6/include/qt/qstyle.h
configure: 28333: /usr/X11R6/include/qt2/qstyle.h
configure: 28333: /usr/include/qt3/qstyle.h
configure: 28333: ./qstyle.h
configure:28451: rm -rf SunWS_cache; g++ -o conftest -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -INO -I.  -DQT_THREAD_SUPPORT  -D_REENTRANT  -L/usr/lib/qt3 -L/usr/lib   conftest.cc  -lqt-mt   -ldl  -lXext -lX11 -lSM -lICE  -lpthread 1>&5
conftest.cc:2:21: fatal error: qglobal.h: No such file or directory
 #include <qglobal.h>
                     ^
compilation terminated.
configure:28454: $? = 1
configure: failed program was:
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <qcursor.h>
#include <qstylefactory.h>
#include <private/qucomextra_p.h>
#if ! (QT_VERSION >= 0x030200)
#error 1
#endif

int main() {
    (void)QStyleFactory::create(QString::null);
    QCursor c(Qt::WhatsThisCursor);
    return 0;
}
configure:28494: error: Qt (>= Qt 3.2) (headers and libraries) not found. Please check your installation!
For more details about this problem, look at the end of config.log.

I've installed:

sudo apt-get install libqt4-*
sudo apt-get install qt5-default
sudo apt-get install qtcreator

However, i still got the same error. Anyone can help me?

@Edit: Maybe the problem is the PATH to Qt files, because i found "qstyle.h" in the folder /usr/include/qt4/qt, for example.

7
  • Which program are you trying to install/build? Nov 26, 2013 at 12:42
  • @user1251007 fnch.users.sourceforge.net/kateocaml-0.1.tar.gz
    – 6c656c
    Nov 26, 2013 at 12:45
  • You might need to install even qt3 before by running sudo apt-get install libqt3-* Nov 26, 2013 at 12:59
  • @user1251007 It's already installed.
    – 6c656c
    Nov 26, 2013 at 13:03
  • try this ./configure --with-qt-includes=/usr/include/qt3/ --with-qt-libraries=/usr/lib/qt3 Nov 26, 2013 at 13:05

3 Answers 3

6

Running Debian Wheezy I installed the following packages to successfully configure:

libqt4-dev (4:4.8.2+dfsg-11)
libqt4-dev-bin (4:4.8.2+dfsg-11)
libqt4-opengl-dev (4:4.8.2+dfsg-11)
libqtwebkit-dev (2.2.1-5)
qt4-linguist-tools (4:4.8.2+dfsg-11)
qt4-qmake (4:4.8.2+dfsg-11)
1
  • Still Works for 18.04! Thanks! +1 Jun 4, 2018 at 14:37
4

Searching to figure out which package contained Qt5 headers brought me to this post first. So in case that happens to someone else;

Ubuntu 18.04 'bionic', Qt5 headers are in qtbase5-dev

1
  • could you please specify the entire path?
    – Franva
    Jul 20, 2021 at 16:25
0

If you run:

qmake -query QT_INSTALL_HEADERS

This will return the location of the Qt header files, e.g for me: /usr/include/x86_64-linux-gnu/qt5

Source: https://stackoverflow.com/questions/56092404/how-to-find-location-of-qt-include-headers-on-linux

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .