Results 1 to 7 of 7

Thread: Apt update and upgrade commands not working

  1. #1
    Join Date
    2022-Mar
    Posts
    1

    Apt update and upgrade commands not working

    Hi
    I have installed a fresh copy of Kali linux on my Acer Laptop (Intel i5, 8 GB RAM, 1 TB HDD) today and tried to update the repositories. But It always ended up with the following error.
    Code:
    Hit:1 http://download.virtualbox.org/virtualbox/debian buster InRelease
    Get:2 http://ftp.harukasan.org/kali kali-rolling InRelease [30.6 kB]
    Get:3 http://ftp.harukasan.org/kali kali-last-snapshot InRelease [30.6 kB]
    Get:4 http://ftp.harukasan.org/kali kali-rolling/main amd64 Packages [18.0 MB]
    Get:5 http://ftp.harukasan.org/kali kali-rolling/main amd64 Contents (deb) [40.9 MB]                                                                                                           
    Ign:5 http://ftp.harukasan.org/kali kali-rolling/main amd64 Contents (deb)                                                                                                                     
    Get:6 http://ftp.harukasan.org/kali kali-rolling/contrib amd64 Packages [108 kB]                                                                                                               
    Get:7 http://ftp.harukasan.org/kali kali-rolling/non-free amd64 Packages [182 kB]                                                                                                              
    Err:5 http://http.kali.org/kali kali-rolling/main amd64 Contents (deb)                                                                                                                         
      File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 221.161.139.110 80]
    Get:8 http://ftp.harukasan.org/kali kali-rolling/non-free amd64 Contents (deb) [949 kB]                                                                                                        
    Ign:8 http://ftp.harukasan.org/kali kali-rolling/non-free amd64 Contents (deb)                                                                                                                 
    Err:5 http://http.kali.org/kali kali-rolling/main amd64 Contents (deb)                                                                                                                         
      File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 221.161.139.110 80]
    Get:9 http://ftp.harukasan.org/kali kali-last-snapshot/main amd64 Packages [17.9 MB]                                                                                                           
    Ign:8 http://http.kali.org/kali kali-rolling/non-free amd64 Contents (deb)                                                                                                                     
    Get:10 http://ftp.harukasan.org/kali kali-last-snapshot/main amd64 Contents (deb) [40.7 MB]                                                                                                    
    Get:11 http://ftp.harukasan.org/kali kali-last-snapshot/contrib amd64 Packages [114 kB]                                                                                                        
    Get:12 http://ftp.harukasan.org/kali kali-last-snapshot/contrib amd64 Contents (deb) [153 kB]                                                                                                  
    Get:13 http://ftp.harukasan.org/kali kali-last-snapshot/non-free amd64 Packages [214 kB]                                                                                                       
    Get:14 http://ftp.harukasan.org/kali kali-last-snapshot/non-free amd64 Contents (deb) [1,006 kB]                                                                                               
    Get:15 http://ftp.harukasan.org/kali kali-rolling/contrib amd64 Contents (deb) [129 kB]                                                                                                        
    Ign:15 http://ftp.harukasan.org/kali kali-rolling/contrib amd64 Contents (deb)                                                                                                                 
    Fetched 78.5 MB in 1min 20s (987 kB/s)                                                                                                                                                         
    Reading package lists... Done
    E: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/main/Contents-amd64  File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 221.161.139.110 80]
    E: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/non-free/Contents-amd64  File has unexpected size (976810 != 949265). Mirror sync in progress? [IP: 221.161.139.110 80]
    E: Some index files failed to download. They have been ignored, or old ones used instead.
    My Kali linux version is Linux kali 5.15.0-kali3-amd64 #1 SMP Debian 5.15.15-2kali1 (2022-01-31) x86_64 GNU/Linux

    Sources.list file
    # See https://www.kali.org/docs/general-us...-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 http://http.kali.org/kali kali-last-snapshot main contrib non-free

    Because of this, I cannot install a new package in my system. Checked with different network connections and changed http to https in sources.list also but doesnt resolve the issue. Is this a problem with Kali's repositories or my system?
    Thanks in advance!

  2. #2
    check your internet connection if strong and not CDC and of course need stable connection to download all package and contents

  3. #3
    Join Date
    2018-Dec
    Posts
    9
    Hi, I have the same problem (and the same laptop ). yesterday i tried many solutions but they don't work.

    I hope in a good person, I made a post today.

    edit

    Hi, I have been trying solutions for three days without getting results, in the end I opted to uninstall the 2020 version (even if always updated with dist-upgrade) and replace it with the latest version always available from kali.
    For some time I have noticed that many are present, but few help those who begin, there is an impression of detachment, of separation from those who have learned to those who are learning and I do not think this is good.
    This is just my thought that I wanted to express, considering the multitude of unanswered requests in the forum.
    Last edited by Anselmino; 2022-03-24 at 15:51. Reason: Resolved

  4. #4
    Hi,you can refer to this https://www.kali.org/docs/general-us...-repositories/
    Enabling the kali-last-snapshot branch is done with the command:


    kali@kali:~$ echo "deb http://http.kali.org/kali kali-last-snapshot main contrib non-free" | sudo tee /etc/apt/sources.list


    Note that such a change is effective only after running sudo apt update.

    This part solve my problem. You can try it.

  5. #5
    Join Date
    2022-Jul
    Posts
    1
    Hello,

    I think you just need to change http to https and it will work.

    You enter this command in the terminal:

    "sudo nano /etc/apt/sources.list"
    then you write the below 2 lines:

    deb https://http.kali.org/kali kali-rolling main contrib non-free
    deb-src http://http.kali.org/kali kali-rolling main contrib non-free

    and then save and exit.

    lastly, you write "sudo apt update" and hopefully it will work.

    [



    QUOTE=jomon;120508]Hi
    I have installed a fresh copy of Kali linux on my Acer Laptop (Intel i5, 8 GB RAM, 1 TB HDD) today and tried to update the repositories. But It always ended up with the following error.
    Code:
    Hit:1 http://download.virtualbox.org/virtualbox/debian buster InRelease
    Get:2 http://ftp.harukasan.org/kali kali-rolling InRelease [30.6 kB]
    Get:3 http://ftp.harukasan.org/kali kali-last-snapshot InRelease [30.6 kB]
    Get:4 http://ftp.harukasan.org/kali kali-rolling/main amd64 Packages [18.0 MB]
    Get:5 http://ftp.harukasan.org/kali kali-rolling/main amd64 Contents (deb) [40.9 MB]                                                                                                           
    Ign:5 http://ftp.harukasan.org/kali kali-rolling/main amd64 Contents (deb)                                                                                                                     
    Get:6 http://ftp.harukasan.org/kali kali-rolling/contrib amd64 Packages [108 kB]                                                                                                               
    Get:7 http://ftp.harukasan.org/kali kali-rolling/non-free amd64 Packages [182 kB]                                                                                                              
    Err:5 http://http.kali.org/kali kali-rolling/main amd64 Contents (deb)                                                                                                                         
      File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 221.161.139.110 80]
    Get:8 http://ftp.harukasan.org/kali kali-rolling/non-free amd64 Contents (deb) [949 kB]                                                                                                        
    Ign:8 http://ftp.harukasan.org/kali kali-rolling/non-free amd64 Contents (deb)                                                                                                                 
    Err:5 http://http.kali.org/kali kali-rolling/main amd64 Contents (deb)                                                                                                                         
      File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 221.161.139.110 80]
    Get:9 http://ftp.harukasan.org/kali kali-last-snapshot/main amd64 Packages [17.9 MB]                                                                                                           
    Ign:8 http://http.kali.org/kali kali-rolling/non-free amd64 Contents (deb)                                                                                                                     
    Get:10 http://ftp.harukasan.org/kali kali-last-snapshot/main amd64 Contents (deb) [40.7 MB]                                                                                                    
    Get:11 http://ftp.harukasan.org/kali kali-last-snapshot/contrib amd64 Packages [114 kB]                                                                                                        
    Get:12 http://ftp.harukasan.org/kali kali-last-snapshot/contrib amd64 Contents (deb) [153 kB]                                                                                                  
    Get:13 http://ftp.harukasan.org/kali kali-last-snapshot/non-free amd64 Packages [214 kB]                                                                                                       
    Get:14 http://ftp.harukasan.org/kali kali-last-snapshot/non-free amd64 Contents (deb) [1,006 kB]                                                                                               
    Get:15 http://ftp.harukasan.org/kali kali-rolling/contrib amd64 Contents (deb) [129 kB]                                                                                                        
    Ign:15 http://ftp.harukasan.org/kali kali-rolling/contrib amd64 Contents (deb)                                                                                                                 
    Fetched 78.5 MB in 1min 20s (987 kB/s)                                                                                                                                                         
    Reading package lists... Done
    E: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/main/Contents-amd64  File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 221.161.139.110 80]
    E: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/non-free/Contents-amd64  File has unexpected size (976810 != 949265). Mirror sync in progress? [IP: 221.161.139.110 80]
    E: Some index files failed to download. They have been ignored, or old ones used instead.
    My Kali linux version is Linux kali 5.15.0-kali3-amd64 #1 SMP Debian 5.15.15-2kali1 (2022-01-31) x86_64 GNU/Linux

    Sources.list file
    # See https://www.kali.org/docs/general-us...-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 http://http.kali.org/kali kali-last-snapshot main contrib non-free

    Because of this, I cannot install a new package in my system. Checked with different network connections and changed http to https in sources.list also but doesnt resolve the issue. Is this a problem with Kali's repositories or my system?
    Thanks in advance![/QUOTE]

  6. #6
    Join Date
    2022-Nov
    Location
    Valencia, Spain
    Posts
    1
    Yes. You are my hero! Almost a week dealing with this problem and you solved it for me. Thanks a lot man!


    Quote Originally Posted by uniiq View Post
    Hello,

    I think you just need to change http to https and it will work.

    You enter this command in the terminal:

    "sudo nano /etc/apt/sources.list"
    then you write the below 2 lines:

    deb https://http.kali.org/kali kali-rolling main contrib non-free
    deb-src http://http.kali.org/kali kali-rolling main contrib non-free

    and then save and exit.

    lastly, you write "sudo apt update" and hopefully it will work.

    [



    QUOTE=jomon;120508]Hi
    I have installed a fresh copy of Kali linux on my Acer Laptop (Intel i5, 8 GB RAM, 1 TB HDD) today and tried to update the repositories. But It always ended up with the following error.
    Code:
    Hit:1 http://download.virtualbox.org/virtualbox/debian buster InRelease
    Get:2 http://ftp.harukasan.org/kali kali-rolling InRelease [30.6 kB]
    Get:3 http://ftp.harukasan.org/kali kali-last-snapshot InRelease [30.6 kB]
    Get:4 http://ftp.harukasan.org/kali kali-rolling/main amd64 Packages [18.0 MB]
    Get:5 http://ftp.harukasan.org/kali kali-rolling/main amd64 Contents (deb) [40.9 MB]                                                                                                           
    Ign:5 http://ftp.harukasan.org/kali kali-rolling/main amd64 Contents (deb)                                                                                                                     
    Get:6 http://ftp.harukasan.org/kali kali-rolling/contrib amd64 Packages [108 kB]                                                                                                               
    Get:7 http://ftp.harukasan.org/kali kali-rolling/non-free amd64 Packages [182 kB]                                                                                                              
    Err:5 http://http.kali.org/kali kali-rolling/main amd64 Contents (deb)                                                                                                                         
      File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 221.161.139.110 80]
    Get:8 http://ftp.harukasan.org/kali kali-rolling/non-free amd64 Contents (deb) [949 kB]                                                                                                        
    Ign:8 http://ftp.harukasan.org/kali kali-rolling/non-free amd64 Contents (deb)                                                                                                                 
    Err:5 http://http.kali.org/kali kali-rolling/main amd64 Contents (deb)                                                                                                                         
      File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 221.161.139.110 80]
    Get:9 http://ftp.harukasan.org/kali kali-last-snapshot/main amd64 Packages [17.9 MB]                                                                                                           
    Ign:8 http://http.kali.org/kali kali-rolling/non-free amd64 Contents (deb)                                                                                                                     
    Get:10 http://ftp.harukasan.org/kali kali-last-snapshot/main amd64 Contents (deb) [40.7 MB]                                                                                                    
    Get:11 http://ftp.harukasan.org/kali kali-last-snapshot/contrib amd64 Packages [114 kB]                                                                                                        
    Get:12 http://ftp.harukasan.org/kali kali-last-snapshot/contrib amd64 Contents (deb) [153 kB]                                                                                                  
    Get:13 http://ftp.harukasan.org/kali kali-last-snapshot/non-free amd64 Packages [214 kB]                                                                                                       
    Get:14 http://ftp.harukasan.org/kali kali-last-snapshot/non-free amd64 Contents (deb) [1,006 kB]                                                                                               
    Get:15 http://ftp.harukasan.org/kali kali-rolling/contrib amd64 Contents (deb) [129 kB]                                                                                                        
    Ign:15 http://ftp.harukasan.org/kali kali-rolling/contrib amd64 Contents (deb)                                                                                                                 
    Fetched 78.5 MB in 1min 20s (987 kB/s)                                                                                                                                                         
    Reading package lists... Done
    E: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/main/Contents-amd64  File has unexpected size (40914837 != 40904768). Mirror sync in progress? [IP: 221.161.139.110 80]
    E: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/non-free/Contents-amd64  File has unexpected size (976810 != 949265). Mirror sync in progress? [IP: 221.161.139.110 80]
    E: Some index files failed to download. They have been ignored, or old ones used instead.
    My Kali linux version is Linux kali 5.15.0-kali3-amd64 #1 SMP Debian 5.15.15-2kali1 (2022-01-31) x86_64 GNU/Linux

    Sources.list file
    # See https://www.kali.org/docs/general-us...-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 http://http.kali.org/kali kali-last-snapshot main contrib non-free

    Because of this, I cannot install a new package in my system. Checked with different network connections and changed http to https in sources.list also but doesnt resolve the issue. Is this a problem with Kali's repositories or my system?
    Thanks in advance!
    [/QUOTE]

  7. #7
    Thanks , it worked for me

Similar Threads

  1. WiFi not working after update/upgrade
    By YDKme in forum TroubleShooting Archive
    Replies: 1
    Last Post: 2020-02-02, 00:34
  2. apt-get update / upgrade not working
    By Lord_Flaya in forum TroubleShooting Archive
    Replies: 9
    Last Post: 2016-08-02, 07:44
  3. Beef Stopped Working after update and upgrade
    By SDee in forum General Archive
    Replies: 2
    Last Post: 2016-03-16, 11:39

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •