当前位置:   article > 正文

qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt5/bin/qmake': No such file or directory_linux the qmake executable /usr/lib/qt5/bin/qmake

linux the qmake executable /usr/lib/qt5/bin/qmake could notbe added: qmake
  1. 1:@ubuntu:/usr/bin$ ./qmake
  2. qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt5/bin/qmake': No such file or directory
  3. 2:查看qmake文件,发现qmake指向qtchooser
  4. @ubuntu:/usr/bin$ ls -l qmake
  5. lrwxrwxrwx 1 root root 9 May 9 2016 qmake -> qtchooser
  6. 3:打印qtchooser的配置信息
  7. @ubuntu:/usr/bin$ ./qtchooser -print-env
  8. QT_SELECT="default"
  9. QTTOOLDIR="/usr/lib/x86_64-linux-gnu/qt5/bin"
  10. QTLIBDIR="/usr/lib/x86_64-linux-gnu"
  11. 配置文件指向的地方已经删除了,新的QT在其他目录下,需要修改配置文件
  12. 4:查找qtchooser的配置文件
  13. @ubuntu:/usr$ find ./ | grep qtchooser
  14. ./share/qtchooser
  15. ./share/qtchooser/qt5-x86_64-linux-gnu.conf
  16. ./share/qtchooser/qt4-x86_64-linux-gnu.conf
  17. ./share/doc/qtchooser
  18. ./share/doc/qtchooser/README.Debian
  19. ./share/doc/qtchooser/copyright
  20. ./share/doc/qtchooser/changelog.Debian.gz
  21. ./share/man/man1/qtchooser.1.gz
  22. ./share/lintian/overrides/qtchooser
  23. ./bin/qtchooser
  24. ./lib/x86_64-linux-gnu/qtchooser
  25. ./lib/x86_64-linux-gnu/qtchooser/qt5.conf
  26. ./lib/x86_64-linux-gnu/qtchooser/4.conf
  27. ./lib/x86_64-linux-gnu/qtchooser/qt4.conf
  28. ./lib/x86_64-linux-gnu/qtchooser/5.conf
  29. ./lib/x86_64-linux-gnu/qtchooser/default.conf
  30. ./lib/x86_64-linux-gnu/qt-default/qtchooser
  31. ./lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
  32. 5:挨个试,最后发现是这个
  33. @ubuntu:/usr/share/qtchooser$ cat qt5-x86_64-linux-gnu.conf
  34. /usr/lib/x86_64-linux-gnu/qt5/bin
  35. /usr/lib/x86_64-linux-gnu
  36. 6:修改这个配置文件,将路径改成目前QT所在的路径
  37. /opt/Qt5.7.1/5.7/gcc_64/bin
  38. /opt/Qt5.7.1/5.7
  39. 再运行qmake,好用了!
  40. @ubuntu:/usr/share/qtchooser$ qmake
  41. Usage: /opt/Qt5.7.1/5.7/gcc_64/bin/qmake [mode] [options] [files]
  42. ......


声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/95112
推荐阅读
相关标签
  

闽ICP备14008679号