cmake not working, could not exec qmake

核能气质少年 提交于 2019-11-29 22:46:28

Does the trick:

sudo apt-get install qt4-qmake

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

Alexandre Holden Daly

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

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

You need the qt dependences:

sudo apt-get install qt4-qmake libqt4-dev

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

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!