I am trying to compile a Qt application through command line in ubuntu. for me "which qmake " giving /usr/bin. I have given the Qt/bin path in PATH variable. How to change the qmake path in to Qt/bin.
Thanks in advance.
Your question is difficult to understand, so I'll summarize what I think you've asked:
There is a qmake installed into /usr/bin/qmake and a different qmake installed in /path/to/Qt/bin/qmake. You want to use the /path/to/Qt/bin/qmake. You have added /path/to/Qt/bin to your PATH environment variable but calling which qmake still returns /usr/bin/qmake.
There's several possible causes:
/path/to/Qt/bin/qmake may not allow you to execute it. Check that ls -l /path/to/Qt/bin/qmake shows that you have x permission./path/to/Qt/bin/qmake may not allow you to traverse the directory. If the ls -l output from the previous step worked, this is not your problem./path/to/Qt/bin is one of the first entries in your PATH environment variable. The shell searches directories from the first to the last, in order, to find executables.PATH after running qmake, the shell will have hashed the location of the qmake executable internally as a performance optimization. Executables almost never move during a shell session, so this is a useful way to reduce useless system calls. Check the output of hash -t qmake to see if this is what happened. Or just execute hash -r to force the shell to forget all paths. (This has no serious consequences.)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With