赞
踩
1:@ubuntu:/usr/bin$ ./qmake qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt5/bin/qmake': No such file or directory 2:查看qmake文件,发现qmake指向qtchooser @ubuntu:/usr/bin$ ls -l qmake lrwxrwxrwx 1 root root 9 May 9 2016 qmake -> qtchooser 3:打印qtchooser的配置信息 @ubuntu:/usr/bin$ ./qtchooser -print-env QT_SELECT="default" QTTOOLDIR="/usr/lib/x86_64-linux-gnu/qt5/bin" QTLIBDIR="/usr/lib/x86_64-linux-gnu" 配置文件指向的地方已经删除了,新的QT在其他目录下,需要修改配置文件 4:查找qtchooser的配置文件 @ubuntu:/usr$ find ./ | grep qtchooser ./share/qtchooser ./share/qtchooser/qt5-x86_64-linux-gnu.conf ./share/qtchooser/qt4-x86_64-linux-gnu.conf ./share/doc/qtchooser ./share/doc/qtchooser/README.Debian ./share/doc/qtchooser/copyright ./share/doc/qtchooser/changelog.Debian.gz ./share/man/man1/qtchooser.1.gz ./share/lintian/overrides/qtchooser ./bin/qtchooser ./lib/x86_64-linux-gnu/qtchooser ./lib/x86_64-linux-gnu/qtchooser/qt5.conf ./lib/x86_64-linux-gnu/qtchooser/4.conf ./lib/x86_64-linux-gnu/qtchooser/qt4.conf ./lib/x86_64-linux-gnu/qtchooser/5.conf ./lib/x86_64-linux-gnu/qtchooser/default.conf ./lib/x86_64-linux-gnu/qt-default/qtchooser ./lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf 5:挨个试,最后发现是这个 @ubuntu:/usr/share/qtchooser$ cat qt5-x86_64-linux-gnu.conf /usr/lib/x86_64-linux-gnu/qt5/bin /usr/lib/x86_64-linux-gnu 6:修改这个配置文件,将路径改成目前QT所在的路径 /opt/Qt5.7.1/5.7/gcc_64/bin /opt/Qt5.7.1/5.7 再运行qmake,好用了! @ubuntu:/usr/share/qtchooser$ qmake Usage: /opt/Qt5.7.1/5.7/gcc_64/bin/qmake [mode] [options] [files] ......
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。