Debian 12 Bookworm 与 cdrom 中的 apt 哈希值错误

Debian 12 Bookworm 与 cdrom 中的 apt 哈希值错误

我刚刚第一次安装 Debian 12 Bookworm。

apt 不会安装 gparted。存在哈希不匹配错误:

$ sudo apt install gparted
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  gparted-common
Suggested packages:
  dmraid gpart jfsutils kpartx mtools reiser4progs reiserfsprogs udftools xfsprogs
The following NEW packages will be installed:
  gparted gparted-common
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2542 kB of archives.
After this operation, 8724 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 file:/media/debian-disc bookworm/main amd64 gparted-common all 1.3.1-1 [1711 kB]
Err:1 file:/media/debian-disc bookworm/main amd64 gparted-common all 1.3.1-1
  Hash Sum mismatch
  Hashes of expected file:
   - SHA256:448c2a1c439a2526123c661025fadc190b5a9c561d23d2e6c44264118fe184b7
   - MD5Sum:5fdcf4d3c2272fa5fc9affe8ccd77786 [weak]
   - Filesize:1711028 [weak]
  Hashes of received file:
  Last modification reported: Tue, 08 Feb 2022 22:12:15 +0000
Get:2 file:/media/debian-disc bookworm/main amd64 gparted amd64 1.3.1-1 [831 kB]
Err:2 file:/media/debian-disc bookworm/main amd64 gparted amd64 1.3.1-1
  Hash Sum mismatch
  Hashes of expected file:
   - SHA256:41d45a07fa0e79a9e135da38220bdd124bd09c370029e21ca1e4853b6579a538
   - MD5Sum:4977aac4bd411819c5d4ea6d979eaabc [weak]
   - Filesize:831132 [weak]
  Hashes of received file:
  Last modification reported: Tue, 08 Feb 2022 22:12:13 +0000
E: Read error - read (5: Input/output error)
E: Read error - read (5: Input/output error)

我能够通过注释掉 sources.list 中第一行(即 cdrom 行)来修复此问题。因此,它很乐意从网络上获取 gparted,但不喜欢从 cd 中获取。这似乎有点浪费,尤其是对于像 gparted 这样的旧包。有什么想法可以修复此问题吗?

答案1

这似乎有点浪费,特别是对于像 gparted 这样的遗留软件包。任何想法如何解决这一问题?

该错误告诉您从 CDROM 读取的文件不是它应该的文件 – 因此,写入或读取磁盘时可能存在数据损坏。

因此,除了确保您下载了新的 CDROM 映像、其校验和正确以及刻录后 CDROM 的校验和也正确之外,实际上没有什么需要修复的。

相关内容