jetson 安装atp-get install qt时出现 unable to locate 或者dependencies unmet的报错

问题

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 
  • 1
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值