0

I just installed Ubuntu 20.04 on a laptop previously running Ubuntu 19.04. The complete "Erase disk and install Ubuntu" option was used and the installation medium was a USB stick.

The first thing I try to do after installation is of course sudo apt-get update and bam! Errors:

    Err:6 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages
  Hash Sum mismatch
  Hashes of expected file:
   - Filesize:145444 [weak]
   - SHA256:441dab3c8a255fd5fec066a31c406525dab6a5629029e426170033835738ef0f
   - SHA1:70e9e8dec8b9f753d2ddb0d8696b2714fcdbd2b0 [weak]
   - MD5Sum:04ce44602d56d586cc827d4dae28de89 [weak]
  Hashes of received file:
   - SHA256:925ddfd0bf7dc54656ebd729304c8826c779229eab489e39cbda3b83498c305d
   - SHA1:9de08f4ffa54879375ef93899b8179785e795f9a [weak]
   - MD5Sum:3782b8853b62334b19cd0db4e2c4840b [weak]
   - Filesize:145444 [weak]
  Last modification reported: Thu, 29 Oct 2020 19:16:50 +0000
  Release file created at: Sat, 31 Oct 2020 04:53:35 +0000
Fetched 252 kB in 3s (93.9 kB/s)   
Reading package lists... Done
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/main/binary-i386/by-hash/SHA256/441dab3c8a255fd5fec066a31c406525dab6a5629029e426170033835738ef0f  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:145444 [weak]
    - SHA256:441dab3c8a255fd5fec066a31c406525dab6a5629029e426170033835738ef0f
    - SHA1:70e9e8dec8b9f753d2ddb0d8696b2714fcdbd2b0 [weak]
    - MD5Sum:04ce44602d56d586cc827d4dae28de89 [weak]
   Hashes of received file:
    - SHA256:925ddfd0bf7dc54656ebd729304c8826c779229eab489e39cbda3b83498c305d
    - SHA1:9de08f4ffa54879375ef93899b8179785e795f9a [weak]
    - MD5Sum:3782b8853b62334b19cd0db4e2c4840b [weak]
    - Filesize:145444 [weak]
   Last modification reported: Thu, 29 Oct 2020 19:16:50 +0000
   Release file created at: Sat, 31 Oct 2020 04:53:35 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

Also, I cannot install gnome-tweak-tools because of unmet dependencies but I'm guessing that's because the update won't work. I've seen this same problem reported by several other users but solutions suggested there (like removing content of apt lists directory) have either not worked for me or aren't applicable for my case. This is supposed to be a LTS stable release yet the most basic functionality fails.

So, is there a solution to this that would not require me to scratch my brains out?

Ananda
  • 31
  • @karel The accepted answer there doesn't help. But it turns out this answer (https://askubuntu.com/a/803936/123659) for Ubuntu 14.04 matches the solution that worked for me. – Ananda Oct 31 '20 at 08:33
  • If an answer from the linked duplicate question answered your question there is a link somewhere outside the text book of your question that you can click to mark your question as a duplicate of the linked question. – karel Oct 31 '20 at 08:38

1 Answers1

0

So, here's what worked for me...

  1. Go to your Software Updater settings (Software & Updates).
  2. Under Ubuntu Software, in "Download from" the default selected option will be the "Server from <your_country>".
  3. Just select "Main Server", and apply the settings.
  4. Software Updater will ask for permission to refresh software cache; grant it.
  5. After refreshing software cache the Software & Updates window might freeze and the refresh cache progress bar window has no close option.
  6. Ignore it, and open up a terminal.
  7. Do sudo apt-get update.
  8. Do sudo apt-get dist-upgrade
  9. Reboot.

Installing gnome-tweak-tools works fine now.

The local servers are mostly out of sync. The default option on new installation should be the main server but Ubuntu 20.04 seems to like to set it to the server of your geographical location. Anyone installing Ubuntu 20.04 should do this first.

Ananda
  • 31
  • This seems like a duplicate of https://askubuntu.com/a/126629/19626. "The default option on new installation should be the main server" defeats the purpose of the mirror infrastructure, and seems unwise for several reasons. This answer is stronger without that statement. – user535733 Oct 31 '20 at 11:50
  • Well, then more meticulous care should be taken to properly maintain the mirror infrastructure such that these inconsistencies do not occur. This issue is clearly not a rarity, given how many times this same issue has been reported here on AskUbuntu. It can be extremely misleading especially to first-time users of Ubuntu. Open-source maintenance of so many mirrors can be a challenge and so I do believe it would be wiser to have default option as main server, or at least ask the user while installation with complete information on the shortcomings of both options. A suggestn for future LTS – Ananda Nov 01 '20 at 15:02
  • The standard set by the Ubuntu Mirror Admins is for volunteer mirrors to sync a minimum of four times daily. Since your mirror is not meeting that standard, please report it. The way to report it is in the link. If community members report slow mirrors, then all the other changes seem unnecessary. Ubuntu is a community-driven project. – user535733 Nov 01 '20 at 15:17