Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:linux:kali_apt-file_unexpected_size [2024/01/25 21:15] – removed psycoreen:linux:kali_apt-file_unexpected_size [2024/02/05 16:47] (current) – old revision restored (2024/01/25 21:16) psycore
Line 1: Line 1:
 +{{tag>english startpage linux kali apt}}
 +====== Kali Linuxc: apt error - File has unexpected size ======
  
 +===== problem =====
 +
 +The following error is displayed when updating via [[wpde>apt-get]] :
 +
 +<code text>
 +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?
 +</code>
 +
 +===== Workaround =====
 +
 +The apt update via [[wpde>http]] should be changed to [[wpde>https]] :
 +
 +<code bash>
 +echo "deb https://http.kali.org/kali kali-rolling main non-free contrib" > /etc/apt/sources.list
 +apt clean
 +apt update
 +apt upgrade
 +</code>
 +
 +Alternatively, the [[wpde>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:
 +
 +<code text>
 +# 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
 +</code>