qmake: could not find a Qt installation of '&#

2019-01-30 16:43发布

I have a software in ubuntu that requires me to run qmake to generate the Makefile.

However, running qmake gives back this error,

qmake: could not find a Qt installation of ''

I have installed what I thought to be the required packages using,

sudo apt-get install qt4-qmake
sudo apt-get install qt5-qmake

But the error didn't go away.

Any help on this would be gladly appreciated!

标签: qt ubuntu qmake
8条回答
祖国的老花朵
2楼-- · 2019-01-30 17:37

For others in my situation, the solution was:

qmake -qt=qt5

This was on Ubuntu 14.04 after install qt5-qmake. qmake was a symlink to qtchooser which takes the -qt argument.

查看更多
何必那么认真
3楼-- · 2019-01-30 17:42

You could check path to qmake using which qmake.

Consider install qt4-default or qt5-default depends what version of qt you want use.

You could also use qtchooser - a wrapper used to select between Qt development binary versions.

查看更多
登录 后发表回答