4

I have tested all answers of this link. Unfortunately, none of them solved my problem.

When I fire apt update up, it gives me:

Hit:1 http://ir.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://ir.archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:3 http://ir.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://ir.archive.ubuntu.com/ubuntu bionic-proposed InRelease [242 kB]                                                           
Hit:5 http://ir.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                   
Get:6 http://ir.archive.ubuntu.com/ubuntu bionic/multiverse Sources [181 kB]                                                           
Get:7 http://ir.archive.ubuntu.com/ubuntu bionic/restricted Sources [5,324 B]                                                          
Get:8 http://ir.archive.ubuntu.com/ubuntu bionic/universe Sources [9,051 kB]                                                           
Get:9 http://ir.archive.ubuntu.com/ubuntu bionic/main Sources [829 kB]                                                                 
Get:10 http://ir.archive.ubuntu.com/ubuntu bionic-security/restricted Sources [4,548 B]                                                
Get:11 http://ir.archive.ubuntu.com/ubuntu bionic-security/universe Sources [167 kB]                                                   
Get:12 http://ir.archive.ubuntu.com/ubuntu bionic-security/multiverse Sources [3,180 B]                                                
Get:13 http://ir.archive.ubuntu.com/ubuntu bionic-security/main Sources [143 kB]                                                       
Get:14 http://ir.archive.ubuntu.com/ubuntu bionic-security/main i386 Packages [442 kB]                                                 
Get:15 http://ir.archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages [651 kB]                                                
Get:16 http://ir.archive.ubuntu.com/ubuntu bionic-security/main Translation-en [211 kB]                                                
Get:17 http://ir.archive.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [38.5 kB]                                        
Get:18 http://ir.archive.ubuntu.com/ubuntu bionic-security/main DEP-11 48x48 Icons [17.6 kB]                                           
Get:19 http://ir.archive.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [41.5 kB]                                           
Get:20 http://ir.archive.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [23.8 kB]                                         
Get:21 http://ir.archive.ubuntu.com/ubuntu bionic-security/restricted i386 Packages [4,280 B]                                          
Get:22 http://ir.archive.ubuntu.com/ubuntu bionic-security/restricted Translation-en [6,528 B]                                         
Get:23 http://ir.archive.ubuntu.com/ubuntu bionic-security/universe i386 Packages [617 kB]                                             
Get:24 http://ir.archive.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [649 kB]                                            
Get:25 http://ir.archive.ubuntu.com/ubuntu bionic-security/universe Translation-en [218 kB]                                            
Get:26 http://ir.archive.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42.1 kB]                                    
Get:27 http://ir.archive.ubuntu.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [16.4 kB]                                       
Get:28 http://ir.archive.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [111 kB]                                        
Get:29 http://ir.archive.ubuntu.com/ubuntu bionic-security/multiverse i386 Packages [4,292 B]                                          
Get:30 http://ir.archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [6,760 B]                                         
Get:31 http://ir.archive.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [2,700 B]                                         
Get:32 http://ir.archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]                                  
Get:32 http://ir.archive.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]                                  
Get:34 http://ir.archive.ubuntu.com/ubuntu bionic-security/multiverse DEP-11 48x48 Icons [29 B]                                        
Get:35 http://ir.archive.ubuntu.com/ubuntu bionic-security/multiverse DEP-11 64x64 Icons [2,638 B]                                     
Get:36 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main Sources [311 kB]                                                        
Get:36 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main Sources [311 kB]                                                        
Get:36 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main Sources [311 kB]                                                        
Get:36 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main Sources [311 kB]                                                        
Get:36 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main Sources [311 kB]                                                        
Get:36 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main Sources [311 kB]                                                        
Get:36 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main Sources [311 kB]                                                        
Get:36 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main Sources [311 kB]                                                        
Get:36 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main Sources [311 kB]                                                        
Get:45 http://ir.archive.ubuntu.com/ubuntu bionic-updates/multiverse Sources [5,840 B]                                                 
Get:46 http://ir.archive.ubuntu.com/ubuntu bionic-updates/restricted Sources [6,536 B]                                                 
Get:47 http://ir.archive.ubuntu.com/ubuntu bionic-updates/universe Sources [278 kB]                                                    
Get:48 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [651 kB]                                                  
Err:48 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages                                                           
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:650672 [weak]
   - SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
   - SHA1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [weak]
   - MD5Sum:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [weak]
  Hashes of received file:
   - SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
   - SHA1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [weak]
   - MD5Sum:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [weak]
   - Filesize:650672 [weak]
  Last modification reported: Sat, 07 Mar 2020 12:57:17 +0000
  Release file created at: Sat, 07 Mar 2020 14:34:50 +0000
Get:49 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [871 kB]                                                 
Err:49 http://ir.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages                                                          
Get:50 http://ir.archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [326 kB]                                             
Get:51 http://ir.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [264 kB]                                      
Get:52 http://ir.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 48x48 Icons [193 kB]                                         
Get:53 http://ir.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [438 kB]                                         
Get:54 http://ir.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [10.1 kB]                                          
Get:55 http://ir.archive.ubuntu.com/ubuntu bionic-updates/multiverse i386 Packages [7,476 B]                                           
Get:56 http://ir.archive.ubuntu.com/ubuntu bionic-updates/multiverse Translation-en [4,636 B]                                          
Get:57 http://ir.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]                                   
Get:58 http://ir.archive.ubuntu.com/ubuntu bionic-updates/multiverse DEP-11 48x48 Icons [29 B]                                         
Get:59 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/multiverse Sources [1,796 B]                                                
Get:60 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/universe Sources [20.5 kB]                                                  
Get:61 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/main Sources [66.6 kB]                                                      
Get:62 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/restricted Sources [5,592 B]                                                
Get:63 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 Packages [111 kB]                                                
Get:64 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/main i386 Packages [82.0 kB]                                                
Get:65 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/main Translation-en [39.0 kB]                                               
Get:66 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/main amd64 DEP-11 Metadata [3,580 B]                                        
Get:67 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/main DEP-11 48x48 Icons [29 B]                                              
Get:68 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/main DEP-11 64x64 Icons [5,301 B]                                           
Get:69 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/restricted i386 Packages [7,820 B]                                          
Get:70 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/restricted amd64 Packages [16.8 kB]                                         
Get:71 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/restricted Translation-en [5,732 B]                                         
Get:72 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/universe amd64 Packages [141 kB]                                            
Get:73 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/universe i386 Packages [134 kB]                                             
Get:74 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/universe Translation-en [27.6 kB]                                           
Get:75 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/universe amd64 DEP-11 Metadata [13.1 kB]                                    
Get:76 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/universe DEP-11 48x48 Icons [5,921 B]                                       
Get:77 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/universe DEP-11 64x64 Icons [16.2 kB]                                       
Get:78 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/multiverse i386 Packages [3,264 B]                                          
Get:79 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/multiverse amd64 Packages [7,588 B]                                         
Get:80 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/multiverse Translation-en [2,836 B]                                         
Get:81 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/multiverse amd64 DEP-11 Metadata [2,468 B]                                  
Get:82 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/multiverse DEP-11 48x48 Icons [29 B]                                        
Get:83 http://ir.archive.ubuntu.com/ubuntu bionic-proposed/multiverse DEP-11 64x64 Icons [2,638 B]                                     
Get:84 http://ir.archive.ubuntu.com/ubuntu bionic-backports/main Sources [2,532 B]                                                     
Get:85 http://ir.archive.ubuntu.com/ubuntu bionic-backports/universe Sources [2,496 B]                                                 
Fetched 18.0 MB in 1min 11s (253 kB/s)                                                                                                 
Reading package lists... Done
E: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-i386/by-hash/SHA256/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:650672 [weak]
    - SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    - SHA1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [weak]
    - MD5Sum:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [weak]
   Hashes of received file:
    - SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    - SHA1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [weak]
    - MD5Sum:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [weak]
    - Filesize:650672 [weak]
   Last modification reported: Sat, 07 Mar 2020 12:57:17 +0000
   Release file created at: Sat, 07 Mar 2020 14:34:50 +0000
E: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/dists/bionic-updates/main/binary-amd64/by-hash/SHA256/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
E: Some index files failed to download. They have been ignored, or old ones used instead.

The /etc/apt/sources.list:

###### Ubuntu Main Repos
deb http://ir.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse 
deb-src http://ir.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://ir.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse 
deb http://ir.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse 
deb http://ir.archive.ubuntu.com/ubuntu/ bionic-proposed main restricted universe multiverse 
deb http://ir.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse 
deb-src http://ir.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse 
deb-src http://ir.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse 
deb-src http://ir.archive.ubuntu.com/ubuntu/ bionic-proposed main restricted universe multiverse 
deb-src http://ir.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse 

I don't know why exactly it is happening and what's the solution.

Thanks in advance.

1

This was reported as a bug here and the solution that helped me was this

or follow these steps:

  1. sudo rm -rf /var/lib/apt/lists/*
  2. sudo apt-get update -o Acquire::CompressionTypes::Order::=gz
  3. sudo apt-get update && sudo apt-get upgrade

Hope it works for anyone with the same issue.

  • 1
    i still get these hash mismatch errors – caduceus Aug 21 '20 at 12:47
  • This worked for me on Ubuntu 18 LTS. Thank you – cdaiga Nov 18 '20 at 5:22
0

Every repository holds a Release file that clients will look for when preforming apt commands. The Release file holds information about the available dists and components (such as bionic main universe and etc.). It specifies the locations and hash sums of every component. Once getting the relevant dist, the client then searches for a package list, containing every available debian, its location, its full name, version, hash sums, size and more. That is how you can differ packages from one repo to another.

If this is an official repository and not a local one managed by you or your organization, there isn't much you can do regarding this specific repo. The administrators must correct this problem, as it is a server side problem.

If you need need a package or an update and don't want to wait - you might want to change or add repositories of other regions by running relevant apt commands: add-apt-repository deb http://repo.tld/ubuntu distro component

You can also edit the source list manually at /etc/apt/sources.list with the repos you seek, by adding repo paths: deb http://repo.tld/ubuntu distro component

Also: if you're using a desktop OS, you can also use the software center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.