PDA

View Full Version : apt-get update gives an error



radhak
2022-03-05, 14:35
The following is my computer details:
Computer: Lenovo Thinkpad X1 Extreme Gen1
OS : Windows 10 Pro Version 21H2 OS Build: 19044.1566
Memory: 64GB
CPU: i7-8850H

Vmware workstation pro version 16.2.1 build-18811642 (licensed)

I am able to install Kali 2022.1 (recommended download) as a VM without any issues on this.

When I open a terminal window within the VM and try the following command is when I get into issues:

sudo apt-get update.

Kali goes through the process and at the end I get the following message:

E: failed to fetch http://http.kali.org/kali/kali-rolling/main/Contents-amd64 File has unexpected size (40914837 != 40904768). Mirror sync in progress? (IP: 118.38.178.199 80)
E: Some index files failed to download. They have been ignored, or old ones used instead.

I tried the same on another lenovo machine running the same version of the OS as well as VMware. The update followed by upgrade completed without any issues.

Changed the entries in /etc/apt/sources.list to reflect https:// instead of http:// and ran the update again. the result is the same error.

How come one laptop is giving an error whereas the other does not. Even tried re-installing the Windows 10 Pro (fresh) and still came up with the same error.

I installed the latest LTS version Ubuntu Desktop as a VM and after completion of the install, opened a terminal window and ran the same command:

sudo apt-get update

it gave me no issues and was able to complete the command line without any error messages.

would appreciate your help immediately.

Maarten
2022-03-25, 13:02
I've had the exact same thing.

I've solved it by choosing another mirror. I think the mirror I used is corrupt. After changing to another mirror it worked right away.

see number 2 here: https://miloserdov.org/?p=4198