在Qt上构建一个项目时,我会得到一个错误:
Failure to read QMAKESPEC conf file /usr/share/qt4/mkspecs/linux-g++/qmake.conf.
Error processing project file: /path/to/my/project/directory/project.pro
01:13:32: The process "/usr/bin/qmake-qt4" exited with code 3.
Error while building/deploying project converter (kit: Qt 4.8.4 in PATH (System))
When executing step 'qmake'但当我处决
locate qmake.conf在终端上,我发现文件位于
/usr/lib64/qt4/mkspecs/linux-g++/qmake.conf如何配置Qt以考虑正确的路径?
发布于 2014-08-21 12:10:38
您可以尝试使用qmake参数运行-spec。
$qmake -spec /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf *.pro或者,您可以在旧文件的位置创建一个指向新文件的符号链接(这将成为一个永久的解决方案)。
#ln -s /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/linux-g++/qmake.conf也可以将环境变量QMAKESPEC设置为对新值进行共同响应。
QMAKESPEC = /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf
export QMAKESPEC要使其永久化,请将其添加到您的.bashrc (或您正在使用的任何shell )中。
https://stackoverflow.com/questions/25316543
复制相似问题