I hope you're all well!
This is my first question ever on stack overflow, so if i'm missing anything, just tell me and it'll be my pleasure to update my question.
So, to summarize my problem, I am trying to install Docker-ce on an Ubuntu 18.04 VM by following the official steps at Docker-Engine Installation and I am getting the error "Hash Sum Mismatch" when running the command "sudo apt-get install docker-ce docker-ce-cli containerd.io".
I went through the official steps a few times and I've tried the following things so far :
1) The following commands, followed by the official installation steps
apt-get clean
rm -rf /var/lib/apt/lists/*
apt-get clean
apt-get update
apt-get upgrade
2) Creation of a file with the following lines, placed at "/etc/apt/apt.conf.d/99fixbadproxy", followed by the official installation steps
Acquire::http::Pipeline-Depth 0;
Acquire::http::No-Cache true;
Acquire::BrokenProxy true;
3) Installation of other versions of docker-ce with the following commands
sudo apt-get install docker-ce 5:19.03.8~3-0~ubuntu-bionic
sudo apt-get install docker-ce 5:19.03.6~3-0~ubuntu-bionic
sudo apt-get install docker-ce 5:18.09.9~3-0~ubuntu-bionic
4) I tried installing different repositories (i think they're called repositories) by adding "nightly" or "test" or both after the word "stable" of the following command
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
And I think that is pretty much it. I did tried other things but unfortunately i don't remember them because I've been working on this issue for quite some time now.
I did not try on a fresh new installation of Ubuntu 18.04 though.
If I'm missing anything in my question, please let me know!
Take care everybody!
EXPLANATION and Solution: Quick Fix
This issue is caused by the Windows Hypervisor Platform. This issue cannot be resolved for now (asfar as I know).
A partial fix is at hand though. And I say"partial" because it involves disabling the platform (also known as"Hyper-V") which will probably break other virtualization solutions you have installed since this is enabled manually. Anyway, here's how to disable it and get your VM running again,
Shut down the Virtual Machine.
Press Windows logo key + X, then hit A to run Command Prompt(powershell) as administrator.
Type bcdedit /set hypervisorlaunchtype off
When you see"The operation completed succesfully", reboot your windows. After reboot, boot your VM and update/upgrade.