问题
jetson nano上安装qt时,使用如下命令
sudo apt-get install qtbase5-dev
出现报错
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
qtbase5-dev : Depends: libqt5core5a (= 5.9.5+dfsg-0ubuntu1) but 5.9.5+dfsg-0ubuntu2.6 is to be installed
Depends: libqt5dbus5 (= 5.9.5+dfsg-0ubuntu1) but 5.9.5+dfsg-0ubuntu2.6 is to be installed
Depends: libqt5gui5 (= 5.9.5+dfsg-0ubuntu1) but 5.9.5+dfsg-0ubuntu2.6 is to be installed
Depends: libqt5network5 (= 5.9.5+dfsg-0ubuntu1) but 5.9.5+dfsg-0ubuntu2.6 is to be installed
Depends: libqt5widgets5 (= 5.9.5+dfsg-0ubuntu1) but 5.9.5+dfsg-0ubuntu2.6 is to be installed
Depends: libqt5xml5 (= 5.9.5+dfsg-0ubuntu1) but 5.9.5+dfsg-0ubuntu2.6 is to be installed
Recommends: libqt5opengl5-dev (= 5.9.5+dfsg-0ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
使用命令
sudo apt-get install qt5-default qtcreator -y
出现报错
E: Unable to locate package qt5-default
E: Unable to locate package qtcreator
解决方案
只需要换源即可。
换成中科大源,然后update,然后重新输入安装命令即可,如下
换中科大源
sudo vim /etc/apt/sources.list
将sources.list里面的内容全部注释,增加以下内容
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb http://mirrors.ustc.edu.cn/ubuntu-ports bionic main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu-ports bionic main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports bionic-updates main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu-ports bionic-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports bionic-backports main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu-ports bionic-backports main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports bionic-security main restricted universe multiverse
# deb-src http://mirrors.ustc.edu.cn/ubuntu-ports bionic-security main restricted universe multiverse
更新系统源
sudo apt-get update
安装qt
sudo apt-get install qt5-default qtcreator -y
sudo reboot
启动
qtcreator