Cannot run qmake in Mac Terminal

前端 未结 6 1524
日久生厌
日久生厌 2021-02-13 02:30

I\'m learning Qt for my C++ course at college. I am trying to set up the environment for my first assignment but I can\'t seem to get it right. I swear I have run qmake in the

6条回答
  •  鱼传尺愫
    2021-02-13 03:07

    The reason why you cannot execute the program is because it's not in the $PATH of the shell you are using. First find where it is located and then add the directory to that binary directory to your $PATH environment variable. Then you'll be able to execute it in your terminal.

    For instance, if you are using ZSH and your program resides in "/opt/local/bin" then execute the following to make it available through $PATH:

    export PATH=$PATH:/opt/local/bin
    

    After this point you would be able to run the program. And you should add this to your shell RC file.

提交回复
热议问题