Cmake not working, qmake failed

I am using Ubuntu 14.04. I am trying to install a program that 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?

+44
cmake qmake
May 16 '14 at 20:15
source share
5 answers

I read in another post that the problem has something to do with the fact that CMake cannot find Qt4 qmake.

However, in my case, it is simply a matter of the absence of qt4-qmake. This allowed (but weighs 440 MB):

 sudo apt-get install qt-sdk 
+48
May 16 '14 at 21:08
source share

Is there a trick:

 sudo apt-get install qt4-qmake 

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

+61
Jun 01 '15 at 0:18
source share

You need qt dependencies:

sudo apt-get install qt4-qmake libqt4-dev

+18
Nov 18 '15 at 19:58
source share

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

 sudo apt install qt5-default 
+5
Jun 08 '17 at 0:42
source share

You can use QtCreator to compile the cmake project. This is only beneficial in the accepted answer, if you already have QtCreator installed, I notice that you are using the qmake project, so this may be likely.

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

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

0
Feb 09 '15 at 4:50
source share



All Articles