一些原因导致我在我的 Ubuntu 14.04 LTS
机器上拥有了两个版本的Qt,Qt4和Qt5。以下是 qtchooser -list-versions
的输出:
4
5
config
default
qt4-i386-linux-gnu
qt4-x86_64-linux-gnu
qt4
qt5-x86_64-linux-gnu
qt5
如何移除Qt5?
一些原因导致我在我的 Ubuntu 14.04 LTS
机器上拥有了两个版本的Qt,Qt4和Qt5。以下是 qtchooser -list-versions
的输出:
4
5
config
default
qt4-i386-linux-gnu
qt4-x86_64-linux-gnu
qt4
qt5-x86_64-linux-gnu
qt5
如何移除Qt5?
./MaintenanceTool
。sudo apt autoremove '.*qt5.*-dev'
在点击“是”之前,请仔细检查要删除的包列表!如果有一些您想保留的包,可以使用apt install
命令手动标记它们为已安装。
Where is your qtchooser configuration file?
$: locate qtchooser | grep conf
From the list of conf files, probably there is one call "default.conf". This one is a link to one of the others (4.conf or qt4.conf or 5.conf or qt5.conf). Choose the one that makes sense to you, and create a link to it.
Suppose your default file path is /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
.
Create a backup:
$: cd $(dirname /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf)
$: cp -av default.conf default.conf_backup
Let's say your target is /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf
, then:
$: sudo ln -s /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf default.conf
Is the path to your qmake right?
Check the qmake location:
$: locate qmake | grep bin
Is this the same one as indicated in your modified qtchooser/default.conf?
$: cat /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf
If the answer is yes, then you are done. If the answer is no, then you need to modify the file:
Create a backup:
$: cd $(dirname /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf)
$: cp -av qt5.conf qt5.conf_backup
Edit the file and change the path to your qmake location:
$ sudo vi qt5.conf
Now it is done.
qtchooser -list-versions
中看到 Qt 4 和 Qt 5。 - ugola5 default qt4-x86_64-linux-gnu qt4 qt5-x86_64-linux-gnu qt5``` 我只想完全清除QT,在这个系统(ubuntu 16.04)之前安装了不同版本的QT并重新开始。尽管有这个输出,我可以继续吗?
- ugola