linux下安装Qt5.7后添加qmake环境变量后出现错误
执行: qmake -v
出现错误:qmake: could not exec ‘/usr/lib/x86_64-linux-gnu/qt4/bin/qmake’: No such file or directory
分析:
qtchooser默认选择路径中没有指向qmake路径
解决方法:
cd /usr/lib/x86_64-linux-gnu/qt-default/qtchooser
sudo vim default.conf
1 /usr/lib/x86_64-linux-gnu/qt4/bin/qmake
2 /usr/lib/x86_64-linux-gnu/qt4
将第一行中的/usr/lib/x86_64-linux-gnu/qt4/bin/qmake
替代为qmake的路径(我的安装路径 /home/xuin/Qt5.7.0/5.7/gcc_64/bin)
which make 查看当前qmake路径