Question

I checked others similar questions, but still didn't understand what I need to do. I have compiled qt-everywhere-opensource-src-5.2.1 library and installed in /home/usr/install/Qt, using --prefix. Everything was fine. But I don't understand how can I use my installed qt library now? For example: I have test project and .pro file. I want to do something like this: 'qmake test.pro' and get the makefile. But

qmake: could not find a Qt installation of ''

What should I do?

Note: I need to install the library only in my home folder. Note2: It's work fine if I run qmake with full path e.g:

~/install/Qt/bin/qmake test.pro

Also, I added in the PATH variable path to my Qt/bin. But if I just write 'qmake ...' without full path to qmake, I have mentioned problem.

Was it helpful?

Solution

This is normal. That is how Unix works. You can only execute binaries with their names in the PATH. You can double check with which if they are found, or even locate.

If you use the full path, then it is all clear for the interpreter for sure. I would suggest to do something in your bash, zsh or etc. profile:

PATH=~/install/Qt/bin/:$PATH

Alternatively, you can just do it manually in a separate session and work with Qt in there.

You could also create an alias for the full path if you wish, but that would be a stranger solution.

Of course, the best would be to install it system-wide, and once your distribution gets it packaged, just use your package manager.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top