Qmake not found, although Qt is installed

I created a Qt project in MS Visual Studio 2010, I'm trying to port it to Linux. I got Linux on which Qt 4.6.3 is installed (comes with the distribution kit).

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

How I installed Qt (running qtconfig in the terminal allows me to know the qt version), this is pretty elusive and strange for me, why can't I use its qmake utility with Qt?

Could you offer me some solution to this problem?

+4
source share
2 answers

What is a distribution? Probably qmake is in a separate package, for example. in the Debian it qt4-qmake package, also find 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 :~$ 
+5
source

Having seen that the Qt3 / Qt4 libraries overlap in all the Linux distributions I tried, I thought it would be nice to give a more complete answer to the solution to this problem. If you are using a debian-based distribution, the previously suggested answer for using dpkg might work; however, for example, on other Linux distributions such as Fedora, this will not work.

A more suitable solution, no matter which distribution you use, if you have alternatives installed, follow these steps:

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

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

+5
source

Source: https://habr.com/ru/post/1436319/


All Articles