为什么我不能使用" qmake"安装后在Mac上?

时间:2018-02-18 01:09:14

标签: homebrew qmake

我正在尝试编译一个项目,我需要运行" qmake"之前"制作"。

我在Mac上,所以我使用自制软件来安装依赖项。

brew install qt

成功安装。但是,当我运行qmake时,我的Mac告诉我:

-bash: qmake: command not found

我不确定是什么问题。为什么brew成功安装后找不到命令?

1 个答案:

答案 0 :(得分:2)

您可以输入brew info qt来获得问题的答案:

This formula is keg-only, which means it was not symlinked into /usr/local,
because Qt 5 has CMake issues when linked.

If you need to have this software first in your PATH run:
  echo 'export PATH="/usr/local/opt/qt/bin:$PATH"' >> ~/.bash_profile

使用

将建议的行添加到~/.bash_profile
echo 'export PATH="/usr/local/opt/qt/bin:$PATH"' >> ~/.bash_profile

并运行:

. ~/.bash_profile

您的命令行可以qmake,但如果您使用它,请注意与cmake的互动。