2

This question is an exact duplicate of:

After a dist-upgrade I can not update Kali and sudo apt-get update returns this error:

Err:1 http://http.kali.org/kali kali-rolling InRelease
  Connection failed [IP: 192.99.200.113 80]
Reading package lists... Done
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  Connection failed [IP: 192.99.200.113 80]
W: Some index files failed to download. They have been ignored, or old ones used instead. 

I searched for update errors in Kali but couldn't find this error.

This is my sources.list file:

# 

#deb cdrom:[Debian GNU/Linux 2017.3 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20171109-13:49]/ kali-rolling contrib main non-free

#deb cdrom:[Debian GNU/Linux 2017.3 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20171109-13:49]/ kali-rolling contrib main non-free

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

How can I fix this?

marked as duplicate by Rui F Ribeiro, G-Man, Romeo Ninov, Toby Speight, Dmitry Grigoryev Mar 13 '18 at 9:04

This question was marked as an exact duplicate of an existing question.

  • 1
    Looks like your address is incorrect.. theres whitespace in your address and im guessing thats the reason why you cant run the update... – ryekayo Mar 12 '18 at 13:38
  • Are you able to ping 192.99.200.113? – GAD3R Mar 12 '18 at 14:49
  • Yes I'm able to ping 192.99.200.113 – kelega Mar 13 '18 at 21:20
6

Can you see the repository (http.kali.org/kali) in a browser? Does it show 'Index of /kali' in your browser?

If you can't see the Index then it might be the cause of firewall/proxy blocks your connection. Please check with your network admin in that case.

Also try to open this URL https://http.kali.org/kali from a browser. If it shows 'Index' in browser then please go for solution 1.

Solution 1:

Try using https repository by executing the following command

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

Then try sudo apt-get update If you find the same error, please choose another solution.

Solution 2: please execute the following command.

apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 7D8D0BF6

Then try sudo apt-get update If you find the same error, please choose another solution.

Solution 3: Please keep a back up file before changing the sources.list file Using text editor add these lines to /etc/apt/sources.list file

deb http://http.kali.org/ /kali main contrib non-free
deb http://http.kali.org/ /wheezy main contrib non-free
deb http://http.kali.org/kali kali-dev main contrib non-free
deb http://http.kali.org/kali kali-dev main/debian-installer
deb-src http://http.kali.org/kali kali-dev main contrib non-free
deb http://http.kali.org/kali kali main contrib non-free
deb http://http.kali.org/kali kali main/debian-installer
deb-src http://http.kali.org/kali kali main contrib non-free
deb http://security.kali.org/kali-security kali/updates main contrib non-free
deb-src http://security.kali.org/kali-security kali/updates main contrib non-free 

Then try sudo apt-get update If you find the same error, please choose another solution.

solution 4: Are you using any proxy server? Then,

check the file /etc/apt/apt.conf

Please add the following three lines in /etc/apt/apt.conf

Acquire::http::proxy "http://proxy:port/"; 
Acquire::ftp::proxy "ftp://proxy:port/"; 
Acquire::https::proxy "https://proxy:port/";

write your IP address in place of 'proxy'

write your port number in place of 'port'

Then try sudo apt-get update If you find the same error, please choose another solution.

  • Thank you so much for solutions. solution 1 worked for me. and yes I can see the repository (http.kali.org/kali) in a browser and http.kali.org/kali too. – kelega Mar 13 '18 at 21:01
  • but I'm confused! Thats all about https? another problem is I have never edited my source.list !!! strange – kelega Mar 13 '18 at 21:42
  • solution 1 worked for me as well, TY – Brock Vond Dec 21 '18 at 2:29
1

Issue At Hand

You are unable to update Kali Linux. This answer is assuming that you have installed Kali Linux or are running it in a Live Persistent configuration. If you are not or do not know what I mean, please refer to the Official Kali Linux Documentation

Solution

According to the Official Kali Linux Documentation concerning the sources.list file. Your /etc/apt/sources.list should look exactly like this:

 deb http://http.kali.org/kali kali-rolling main contrib non-free
 # For source package access, uncomment the following line
 # deb-src http://http.kali.org/kali kali-rolling main contrib non-free

Make sure there is no other repositories or lines because according to the documentation:

The single most common causes of a broken Kali Linux installation are following unofficial advice, and particularly arbitrarily populating the system’s sources.list file with unofficial repositories. The following post aims to clarify what repositories should exist in sources.list, and when they should be used.

Any additional repositories added to the Kali sources.list file will most likely BREAK YOUR KALI LINUX INSTALL.

You can uncomment the last line at your discretion as well. Make sure to run apt update and you should be good.

If You Continue to Have Issues

Do you continue to get the initial error that you reported?

Err:1 http://http.kali.org/kali kali-rolling InRelease
  Connection failed [IP: 192.99.200.113 80]
Reading package lists... Done
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  >     Connection failed [IP: 192.99.200.113 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
  1. Verify Network Connectivity

Test your network connection. Can you communicate with other devices on the network? Can you browse the web or otherwise communicate outside of your network? If you ping www.google.com are you able to resolve the address? Does any of the ICMP packets time out? If you are connected and can resolve domain names, attempt apt update again. Update your post if this does not work with the error you get.

  1. Check your firewall settings

Verify that your firewall on your Kali Linux install or your router is not blocking traffic.

  1. Make sure you are not Live booting and are actually booted into your install or persistent instance.

  2. Check out this post and see if any of the solutions could help.

Best of Luck!

  • Thank you for answering. The solution 1 from @Dipankar Nalui worked for me. – kelega Mar 13 '18 at 21:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.