The officially official Devuan Forum!

You are not logged in.

#1 2018-08-15 02:13:02

0xf4b10
Member
Registered: 2018-05-12
Posts: 33  

How to solve files hash sum mismatches when updating?

I've added to my sources lists the repositories of metasploit and virtualbox in order to make it easy to install them. It was working normally and the updates were coming but today when I tried to update I got the following output:

Err:4 [url]http://downloads.metasploit.com/data/releases/metasploit-framework/apt[/url] lucid/main i386 Packages                   
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:429 [weak]
   - SHA256:02899db9c850f78edc1f5abfdfe485ffbf3b7d04a4695d0ef7ff912aedb1a492
   - SHA1:37419453a05e2a2586e63cf078f597514b919a17 [weak]
   - MD5Sum:b2dcab0962b2b53319f4715beedcb911 [weak]
  Hashes of received file:
   - SHA256:3ae2486b947d2db14add85154b39a4fc35e30dda695d4b628edea71365c846a4
   - SHA1:4672a8054e770556316417658f335ba31cb4160a [weak]
   - MD5Sum:27517729f2a9ed7ec35e051c08983491 [weak]
   - Filesize:428 [weak]
  Last modification reported: Sun, 12 Aug 2018 16:13:17 +0000
  Release file created at: Tue, 14 Aug 2018 11:21:02 +0000
Get:5 [url]http://downloads.metasploit.com/data/releases/metasploit-framework/apt[/url] lucid/main amd64 Packages [429 B]          
Err:5 [url]http://downloads.metasploit.com/data/releases/metasploit-framework/apt[/url] lucid/main amd64 Packages    

Err:13 [url]http://download.virtualbox.org/virtualbox/debian[/url] stretch/contrib i386 Packages                                  
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:1739 [weak]
   - SHA256:e9756829a27c807bf8d25a90a1001adce03a31fb87efc96b13e9854cba66eed8
   - SHA1:83539259fc124b4bbba5f77a1e6e835fe34deebf [weak]
   - MD5Sum:aa86cc0404bedfd33919ca5977f15a24 [weak]
  Hashes of received file:
   - SHA256:f84652d7ac0afe92cb8fa010056f4121551342cdecf7ae104cb9e03057da4167
   - SHA1:1a0de458cdc36a66e8b8bbf68c141a9111775c86 [weak]
   - MD5Sum:37678c5fd937ecd1c2634ba544001112 [weak]
   - Filesize:1727 [weak]
  Last modification reported: Tue, 17 Jul 2018 07:50:04 +0000
  Release file created at: Tue, 14 Aug 2018 16:13:46 +0000
 ......
Fetched 89.8 MB in 41s (2,143 kB/s)                                                                                                                                                                                                                                           
Reading package lists... Done
E: Failed to fetch [url]http://download.virtualbox.org/virtualbox/debian/dists/stretch/contrib/binary-i386/Packages.bz2[/url]  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:1739 [weak]
    - SHA256:e9756829a27c807bf8d25a90a1001adce03a31fb87efc96b13e9854cba66eed8
    - SHA1:83539259fc124b4bbba5f77a1e6e835fe34deebf [weak]
    - MD5Sum:aa86cc0404bedfd33919ca5977f15a24 [weak]
   Hashes of received file:
    - SHA256:f84652d7ac0afe92cb8fa010056f4121551342cdecf7ae104cb9e03057da4167
    - SHA1:1a0de458cdc36a66e8b8bbf68c141a9111775c86 [weak]
    - MD5Sum:37678c5fd937ecd1c2634ba544001112 [weak]
    - Filesize:1727 [weak]
   Last modification reported: Tue, 17 Jul 2018 07:50:04 +0000
   Release file created at: Tue, 14 Aug 2018 16:13:46 +0000
E: Failed to fetch [url]http://downloads.metasploit.com/data/releases/metasploit-framework/apt/dists/lucid/main/binary-i386/Packages.gz[/url]  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:429 [weak]
    - SHA256:02899db9c850f78edc1f5abfdfe485ffbf3b7d04a4695d0ef7ff912aedb1a492
    - SHA1:37419453a05e2a2586e63cf078f597514b919a17 [weak]
    - MD5Sum:b2dcab0962b2b53319f4715beedcb911 [weak]
   Hashes of received file:
    - SHA256:3ae2486b947d2db14add85154b39a4fc35e30dda695d4b628edea71365c846a4
    - SHA1:4672a8054e770556316417658f335ba31cb4160a [weak]
    - MD5Sum:27517729f2a9ed7ec35e051c08983491 [weak]
    - Filesize:428 [weak]
   Last modification reported: Sun, 12 Aug 2018 16:13:17 +0000
   Release file created at: Tue, 14 Aug 2018 11:21:02 +0000
E: Failed to fetch [url]http://downloads.metasploit.com/data/releases/metasploit-framework/apt/dists/lucid/main/binary-amd64/Packages.gz[/url]  
E: Some index files failed to download. They have been ignored, or old ones used instead.

What can be causing this? And also, how to solve?
Thanks in advance

Offline

#2 2018-08-15 13:23:44

GNUser
Member
Registered: 2017-03-16
Posts: 570  

Re: How to solve files hash sum mismatches when updating?

It seems that the repository's Packages, Packages.gz, and Packages.bz2 files recently changed but your system is still looking for the old version of these files because the repository metadata cached on your system is old.

Delete all repository metadata and try again with these commands:

# apt-get clean
# rm -rf /var/lib/apt/lists/*
# apt-get update

Hopefully that'll take care of it.

Last edited by GNUser (2018-08-15 13:26:27)

Offline

#3 2018-08-15 15:09:46

0xf4b10
Member
Registered: 2018-05-12
Posts: 33  

Re: How to solve files hash sum mismatches when updating?

yes, it did
thanks for the help

Offline

#4 2018-09-06 02:29:18

0xf4b10
Member
Registered: 2018-05-12
Posts: 33  

Re: How to solve files hash sum mismatches when updating?

strange thing, this error just happened again but now the proposed solution is not working anymore. Any tips?

Offline

#5 2019-04-08 02:47:34

keb
Member
Registered: 2017-06-14
Posts: 10  

Re: How to solve files hash sum mismatches when updating?

i just did the clearing commands too and am getting those errors, see below.
is it safe to do upgrades? 
is the repository out of sync or hacked?

# apt update

Get:1 [url]http://deb.devuan.org/merged[/url] ascii InRelease [25.6 kB]
Get:2 [url]http://deb.devuan.org/merged[/url] ascii-updates InRelease [25.6 kB]
Get:3 [url]http://deb.devuan.org/merged[/url] ascii-security InRelease [24.9 kB]
Get:4 [url]http://deb.devuan.org/merged[/url] ascii-backports InRelease [25.6 kB]
Get:5 [url]http://deb.devuan.org/merged[/url] ascii/main amd64 Packages [7,227 kB]
Get:6 [url]https://deb.torproject.org/torproject.org[/url] stretch InRelease [4,965 B]
Get:7 [url]https://deb.torproject.org/torproject.org[/url] stretch/main Sources [1,253 B]
Get:8 [url]https://deb.torproject.org/torproject.org[/url] stretch/main amd64 Packages [3,496 B]
Get:9 [url]http://deb.devuan.org/merged[/url] ascii/main amd64 Contents (deb) [28.2 MB]
Err:9 [url]http://deb.devuan.org/merged[/url] ascii/main amd64 Contents (deb)                            
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:28212548 [weak]
   - SHA256:e0e8ec7baba6bc2d4c26918b14aa8e27b95939d9f7440cb98fb087191e8de019
  Hashes of received file:
   - SHA256:76536d452756141be554290f1c99371f67fd7651e3375b25ef11988703d569b1
   - Filesize:28212548 [weak]
  Last modification reported: Sun, 07 Apr 2019 01:33:31 +0000
  Release file created at: Mon, 08 Apr 2019 01:32:03 +0000
Get:10 [url]http://deb.devuan.org/merged[/url] ascii-updates/main amd64 Packages [12.7 kB]               
Get:11 [url]http://deb.devuan.org/merged[/url] ascii-updates/main amd64 Contents (deb) [335 kB]          
Err:11 [url]http://deb.devuan.org/merged[/url] ascii-updates/main amd64 Contents (deb)                   
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:335185 [weak]
   - SHA256:a958a8acee49af960759f7533231b075d184fa8ee7d708764b022d33c1d29e8f
  Hashes of received file:
   - SHA256:75acef3458d85396d38b730213b0fe801508a961f4d30495cfa585b8318ccf95
   - Filesize:335185 [weak]
  Last modification reported: Sun, 07 Apr 2019 01:33:32 +0000
  Release file created at: Mon, 08 Apr 2019 01:30:05 +0000
Get:12 [url]http://deb.devuan.org/merged[/url] ascii-security/main amd64 Packages [446 kB]               
Get:13 [url]http://deb.devuan.org/merged[/url] ascii-security/main amd64 Contents (deb) [36 B]           
Get:14 [url]http://deb.devuan.org/merged[/url] ascii-backports/main amd64 Packages [592 kB]              
Get:15 [url]http://deb.devuan.org/merged[/url] ascii-backports/main amd64 Contents (deb) [5,931 kB]      
Err:15 [url]http://deb.devuan.org/merged[/url] ascii-backports/main amd64 Contents (deb)                 
  Writing more data than expected (5932168 > 5931180) [IP: 37.187.111.86 80]
  Hashes of expected file:
   - Filesize:5931180 [weak]
   - SHA256:8924a5a78342c58434c93dcf676fc82d6efdb2eeea243c1d1fb98d89f9ecc55a
  Release file created at: Mon, 08 Apr 2019 01:30:04 +0000
Fetched 36.9 MB in 42s (872 kB/s)                                                             
Reading package lists... Done
E: Failed to fetch [url]http://deb.devuan.org/merged/dists/ascii/main/Contents-amd64.gz[/url]  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:28212548 [weak]
    - SHA256:e0e8ec7baba6bc2d4c26918b14aa8e27b95939d9f7440cb98fb087191e8de019
   Hashes of received file:
    - SHA256:76536d452756141be554290f1c99371f67fd7651e3375b25ef11988703d569b1
    - Filesize:28212548 [weak]
   Last modification reported: Sun, 07 Apr 2019 01:33:31 +0000
   Release file created at: Mon, 08 Apr 2019 01:32:03 +0000
E: Failed to fetch [url]http://deb.devuan.org/merged/dists/ascii-updates/main/Contents-amd64.gz[/url]  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:335185 [weak]
    - SHA256:a958a8acee49af960759f7533231b075d184fa8ee7d708764b022d33c1d29e8f
   Hashes of received file:
    - SHA256:75acef3458d85396d38b730213b0fe801508a961f4d30495cfa585b8318ccf95
    - Filesize:335185 [weak]
   Last modification reported: Sun, 07 Apr 2019 01:33:32 +0000
   Release file created at: Mon, 08 Apr 2019 01:30:05 +0000
E: Failed to fetch [url]http://deb.devuan.org/merged/dists/ascii-backports/main/Contents-amd64.gz[/url]  Writing more data than expected (5932168 > 5931180) [IP: 37.187.111.86 80]
   Hashes of expected file:
    - Filesize:5931180 [weak]
    - SHA256:8924a5a78342c58434c93dcf676fc82d6efdb2eeea243c1d1fb98d89f9ecc55a
   Release file created at: Mon, 08 Apr 2019 01:30:04 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

update: waiting a week seems to have fixed this.

Last edited by keb (2019-04-22 19:13:39)

Offline

Board footer