Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

qmake not found although Qt installed

Tags:

unix

qt

qmake

I created Qt project in MS Visual Studio 2010, I am trying to port it to linux OS. I got Linux, on which Qt 4.6.3 is installed (came with distribution package).

I need to generate the Makefile for my project (project_name.pro), so I try qmake -project and get command not found

As I got Qt installed (executing qtconfig in terminal allows me to know qt version) it quite unevidient & strange for me why having Qt I can't use it's utility qmake?

Could you please offer me some solution of this issue?

like image 944
spin_eight Avatar asked Dec 21 '22 15:12

spin_eight


2 Answers

What distro is that? Probably qmake is in separate package, e.g. in Debian it's qt4-qmake package, also look for some qt-devel, qt4-devel or similar.

pwadas@vao:~$ which qmake
/usr/bin/qmake
pwadas@vao:~$ ls -al /usr/bin/qmake
lrwxrwxrwx 1 root root 23 mar 26  2012 /usr/bin/qmake -> /etc/alternatives/qmake
pwadas@vao:~$ update-alternatives --list qmake
/usr/bin/qmake-qt3
/usr/bin/qmake-qt4
pwadas@vao:~$ dpkg -S /usr/bin/qmake-qt4
qt4-qmake: /usr/bin/qmake-qt4
pwadas@vao:~$ 
like image 146
Piotr Wadas Avatar answered Jan 07 '23 00:01

Piotr Wadas


Seeing as the Qt3/Qt4 libraries overlap in all the Linux distros I've tried, I thought it might be a good idea to provide a more thorough answer to resolving this issue. If you're running a debian-based distro, the previously-suggested answer to use dpkg might work; however, on other Linux distributions, such as Fedora, for example, that won't quite work.

A more suitable solution, regardless of what distribution you're running, if you have alternatives installed is to do this:

update-alternatives --install /usr/bin/qmake qmake /usr/bin/qmake-qt4 10

Then, for good measure, you can follow that with: update-alternatives --set qmake /usr/bin/qmake-qt4

like image 39
ILMostro_7 Avatar answered Jan 06 '23 23:01

ILMostro_7