debian apt命令_Ubuntu,Debian,Mint和Kali上的Apt命令“哈希总和不匹配”错误和解决方案...

debian apt命令

debian apt命令

apt command is used to install, update, remove packages in Linux distributions like Ubuntu, Debian, Mint, Kali. apt is mainly used with the deb packages.  With the apt update or apt-get update command the repository information is downloaded to from the deb repositories to the local repositories. Hash is used to checking if the downloaded file is valid. If there is a problem we may face with the Hash Sum mismatch error.

apt命令用于安装,更新,删除Linux发行版中的软件包,例如Ubuntu,Debian,Mint,Kali。 apt主要与deb软件包一起使用。 使用apt updateapt-get update命令可以将存储库信息从deb存储库下载到本地存储库。 哈希用于检查下载的文件是否有效。 如果有问题,我们可能会遇到Hash Sum mismatch错误。

“哈希总和不匹配”错误 (“Hash Sum mismatch” Error)

First, we will look at how the  Hash Sum mismatch error occurs during the apt update or  apt-get update command usage.

首先,我们将了解在apt updateapt-get update命令使用过程中如何产生Hash Sum mismatch错误。

$ apt update && apt dist-upgrade -y
"Hash Sum mismatch" Error
“Hash Sum mismatch” Error
“哈希总和不匹配”错误

We can see that following errors and warnings are printed during the update repository information.

我们可以看到在更新存储库信息期间打印了以下错误和警告。

  • Last modification reported: Wed, 26 Jun 2019 12:03:10 +0000

    上次修改的报告时间:2019年6月26日,星期三12:03:10 +0000
  • Hashes of expected file:

    预期文件的哈希值:
  • – Filesize:17059946 [weak]

    –文件大小:17059946 [弱]
  • Last modification reported: Wed, 26 Jun 2019 12:03:10 +0000

    上次修改的报告时间:2019年6月26日,星期三12:03:10 +0000
  • Release file created at: Wed, 26 Jun 2019 12:04:12 +0000

    发布文件创建于:2019年6月26日,星期三12:04:12 +0000
  • E: Some index files failed to download. They have been ignored, or old ones used instead.

    E:某些索引文件下载失败。 它们已被忽略,或改用旧的。

“哈希和不匹配”解决方案 (“Hash Sum mismatch” Solution)

In order to solve the Hash Sum mismatch error, we need to remove downloaded repository information from the /var/lib/apt/lists/ directory. We will use rm -rf command for this. We will also provide the sudo command.

为了解决Hash Sum mismatch错误,我们需要从/var/lib/apt/lists/目录中删除下载的存储库信息。 我们将使用rm -rf命令。 我们还将提供sudo命令。

$ sudo rm -rf /var/lib/apt/lists/*

Then the update command like below will work.

然后,如下所示的update命令将起作用。

$ sudo apt update
LEARN MORE  Ubuntu, Debian, Kali, Mint Apt-Get Search Tutorial with Examples
了解更多Ubuntu,Debian,Kali,Mint Apt-获得带有示例的搜索教程

翻译自: https://www.poftut.com/apt-command-hash-sum-mismatch-error-and-solution-on-ubuntu-debian-mint-kali/

debian apt命令

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值