使用qtchooser选择Qt5
问题是,在我尝试从源代码构建supercollider之前,确保我使用的是Qt5。 问题是这样的:
jsimon@edgy:~$ qmake -v qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory jsimon@edgy:~$ locate qmake /usr/bin/qmake
我认为有一些错误配置qtchooser,文档在这里:
Qtchooser手册页
和这里:
来自Scratch的Linux上的Qtchooser
更多的挖掘,有一个目录,其中包含一些符号链接:
jsimon@edgy:/usr/lib/x86_64-linux-gnu/qtchooser$ ls -al lrwxrwxrwx 1 root root 50 Sep 1 06:04 4.conf -> ../../../share/qtchooser/qt4-x86_64-linux-gnu.conf lrwxrwxrwx 1 root root 50 Sep 1 06:04 5.conf -> ../../../share/qtchooser/qt5-x86_64-linux-gnu.conf lrwxrwxrwx 1 root root 50 Sep 1 06:04 qt4.conf -> ../../../share/qtchooser/qt4-x86_64-linux-gnu.conf lrwxrwxrwx 1 root root 50 Sep 1 06:04 qt5.conf -> ../../../share/qtchooser/qt5-x86_64-linux-gnu.conf
另一个更深入的目录,看起来像我的问题,一个符号链接给Qt4作为默认值:
jsimon@edgy:/usr/lib/x86_64-linux-gnu/qt-default/qtchooser$ ls -al lrwxrwxrwx 1 root root 53 Sep 1 06:04 default.conf -> ../../../../share/qtchooser/qt4-x86_64-linux-gnu.conf
来自qtchooser的一些信息:
jsimon@edgy:~$ qtchooser -print-env QT_SELECT="default" QTTOOLDIR="/usr/lib/x86_64-linux-gnu/qt4/bin" QTLIBDIR="/usr/lib/x86_64-linux-gnu"
看这个页面,它应该很简单:
处理多个Qt版本
然而:
jsimon@edgy:~$ export QT_SELECT=qt5 jsimon@edgy:~$ printenv [snip] QT_SELECT=qt5 [snip] jsimon@edgy:~$ qmake -v qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt5/bin/qmake': No such file or directory
回到我们开始的地方,没有变化。 怎么办?
所有这些都是一个红色的鲱鱼:所需要的只是安装qmake,例如:
sudo apt install qt5-qmake