72

I am using Ubuntu 14.04. I'm trying to install a program which requires cmake. When I run cmake src/ I get:

qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory

What am I doing wrong?

0

6 Answers 6

90

Does the trick:

sudo apt-get install qt4-qmake

You do not need to install half a gigabyte of qt sdk!

2
  • 3
    libqt4-dev add extra stuff required to compile some dependencies Jan 17, 2016 at 7:14
  • worked with qt5-make for me Feb 28 at 19:30
57

I read on another post that the problem has something to do with CMake not being able to find Qt4 qmake.

However in my case, it was simply a matter of not having qt4-qmake. This solved it (but weighs a heavy 440MB):

sudo apt-get install qt-sdk
3
  • In my case, after installing this I also had to install libqt5webkit: sudo apt-get install libqt5webkit5-dev
    – hcarreras
    Sep 17, 2014 at 9:57
  • 21
    If you're counting calories, you may be able to get away with just sudo apt-get install qt4-qmake.
    – bonh
    Sep 24, 2014 at 17:24
  • 8
    @bonh Or, as in my similar case, sudo apt-get install libqt4-dev.
    – andrybak
    Apr 11, 2015 at 7:38
36

For newer versions of Ubuntu, if you have only installed version 5 of the Qt Framework, you may get this error. If you want to use Qt version 5 by default, then you should run the following command to fix the error:

sudo apt install qt5-default
24

You need the qt dependences:

sudo apt-get install qt4-qmake libqt4-dev

4

as it says in docs: https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit#debian--ubuntu

sudo apt-get update
sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x

works for me in Ubuntu 18.04

0

You can use QtCreator to compile the cmake project too. This is only advantageous over the accepted answer if you already have QtCreator installed, I notice you are using a qmake project so this might be likely.

The main advantage of this is that qt creator will be configured to use the qmake tool without the need to install the command line configured version of qmake.

Incidentally, I get this error if I try to run the qmake executable bundled with QtCreator on the command line.

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.