Kali Linuxc: apt error - File has unexpected size

Approved 2024/01/25 21:16 by psycore (version: 1) Newest approved | Approver: psycore

This is an old revision of the document!


Kali Linuxc: apt error - File has unexpected size

problem

The following error is displayed when updating via apt-get :

Err:3 http://http.kali.org/kali kali-rolling/main amd64 gzip amd64 1.8-1+b1
File has unexpected size (225568 != 115516). Mirror sync in progress?

Workaround

The apt update via http should be changed to https :

echo "deb https://http.kali.org/kali kali-rolling main non-free contrib" > /etc/apt/sources.list
apt clean
apt update
apt upgrade

Alternatively, the Nano_(Texteditor) can be used, but care must be taken to ensure that the http source is commented out.

The sources.list should then look like this:

# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
#deb http://http.kali.org/kali kali-rolling main contrib non-free
 
# Additional line for source packages
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free
deb https://http.kali.org/kali kali-rolling main non-free contrib
en/linux/kali_apt-file_unexpected_size.1706213779.txt.gz ยท Last modified: 2024/01/25 21:16
CC Attribution-Noncommercial-Share Alike 4.0 International