MW600GQ——5G模块使用、调试记录

一、树莓派、Linux、Ubuntu问题集合

1、Unable to correct problems, you have held broken packages.

①The following packages have unmet dependencies:
 aptitude : Depends: libapt-pkg5.0 (>= 1.1) but it is not going to be installed
            Recommends: libparse-debianchangelog-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

②sudo apt-get install aptitude安装包报错:The following packages have unmet dependencies

(2条消息) 树莓派想使用 aptitude 解决依赖包问题,但是使用 apt-get 安装 aptitude 时出现依赖包错误怎么办?_FightingBoom的博客-CSDN博客_libapt-pkg5.0

1 问题描述

  我按照此教程:为树莓派更换国内镜像源,更换树莓派镜像源为国内的 清华源 后,在使用 sudo apt-get install aptitude 时,出现依赖包错误的问题,具体错误信息如下:

<span style="color:#000000"><span style="background-color:#282c34"><code class="language-shell">pi@raspberrypi:~ $ <span style="color:#61aeee">sudo</span> <span style="color:#61aeee">apt-get</span> <span style="color:#61aeee">install</span> <span style="color:#61aeee">aptitude</span>
Reading package lists<span style="color:#999999">..</span>. Done
Building dependency tree       
Reading state information<span style="color:#999999">..</span>. Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or <span style="color:#c678dd">if</span> 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 <span style="color:#61aeee">help</span> to resolve the situation:

The following packages have unmet dependencies:
 <span style="color:#61aeee">aptitude</span> <span style="color:#c678dd">:</span> Depends: libapt-pkg5.0 <span style="color:#999999">(</span><span style="color:#669900">>=</span> 1.1<span style="color:#999999">)</span> but it is not going to be installed
            Recommends: libparse-debianchangelog-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
</code></span></span>

  当出现此错误的时候,我也是找了很久,还去论坛上发帖求助(论坛传送门:树莓派更换清华源,安装aptitude报错),但是都没有得到有用的答案。

2 问题原因

  经过不懈的查找原因,终于在一篇文章中发现了些许端倪,文章链接:树莓派失败到放弃!,相关信息截图如下:
在这里插入图片描述
  看到这里,我突然想到,我自己就是在网上百度一个换源的方法,直接就用了,也没管是哪个版本,好了,那么原因应该就是这个。

3 问题解决

  首先我使用命令: lsb_release -a ,查看当前树莓派系统版本,具体信息如下,此版本的代号为 “buster

<span style="color:#000000"><span style="background-color:#282c34"><code class="language-shell">pi@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 10 <span style="color:#999999">(</span>buster<span style="color:#999999">)</span>
Release:	10
Codename:	buster
</code></span></span>

  然后我去看了一下使用镜像源的地址,使用的版本代号为 “stretch” ,如下

<span style="color:#000000"><span style="background-color:#282c34"><code class="language-shell">deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
</code></span></span>

在这里插入图片描述

  于是,我去对应文件,把 stretch 修改为 buster ,大功告成✌️✌️✌️!

  修改完毕后,记得执行如下命令,更新软件源列表!

<span style="color:#000000"><span style="background-color:#282c34"><code class="language-shell"><span style="color:#61aeee">sudo</span> <span style="color:#61aeee">apt-get</span> update
<span style="color:#61aeee">sudo</span> <span style="color:#61aeee">apt-get</span> upgrade
</code></span></span>

  此时,应该会有很多东西需要更新,慢慢等待即可,国内镜像源网速还是挺好的;

  更新完毕之后,即可再次安装 aptitude ,使用如下命令:

<span style="color:#000000"><span style="background-color:#282c34"><code class="language-shell"><span style="color:#61aeee">sudo</span> <span style="color:#61aeee">apt-get</span> <span style="color:#61aeee">install</span> <span style="color:#61aeee">aptitude</span>
</code></span></span>

  大功告成✌️✌️✌️,我终于解决了这个该死的问题,希望对你有所帮助!

  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

行不地上

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值