How to fix apt-get install / update not working on my Kali Linux
183,321
Open a terminal and follow these instructions:
- Type
sudo -i
- Type in your password.
- Type
touch /etc/apt/sources.list
- Type
chmod 644 /etc/apt/sources.list
- Type
echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list
- Type
apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys 7D8D0BF6
- Type
apt update
- Now install whatever it is that you want to install.
Related videos on Youtube
Author by
Learning
Updated on September 18, 2022Comments
-
Learning over 1 year
I'm using Kali Linux but the
apt-get install
command is not working to install any application on my system. Mustafa1112221 I think it's got something to do with my Kali Linux repositorysources.list
file. The file may be empty or the current repo address is wrong or experiencing a problem.Please, could someone provide me a link to the Kali official
sources.list
file?-
7_R3X almost 7 yearsIs it a freshly installed Kali Linux?
-
GAD3R over 2 yearsHi, The last edit make your question unclear. please keep it as it.
-
-
Jim M over 6 yearsI upvoted this answer because Google led me to it when I searched for why 'apt-get update' didn't do anything. It was the 2nd answer from the google-gods and quickly fixed the problem.
-
Toma Tomov over 5 yearsWhat i get on step
6
isgpg:keyserver failed: Network is unreachable
. How should I solve that .. installed Kali and all I see is the bash shell mode. -
7_R3X over 5 years@TomaTomov : Are you able to access the internet? Are you working behind a proxy?
-
Toma Tomov over 5 yearsI think I am not able to access it. No. I am not behind proxy. How to check if i am connected to internet through the command line? What I found is that I need
wpa_supplicant
but I can't install it without the net connection I guess because when I try I getNetwork connection failed
. I am really sorry for my confusing answers but I am total newbie. For now :) -
7_R3X over 5 years@TomaTomov :
apt-get update
does require an internet connection because it downloads information regarding the latest packages and their versions from the repository. You won't be able to take update unless you have an internet connection. To check if you are connected try pinging a website. for example,ping duckduckgo.com
and see if it replies. This is a simple but not a sure shot to check your internet connectivity. Depending upon your environment and firewall configurations, you may or may not get a reply. -
Toma Tomov over 5 yearsI am at work now but will try it as soon as I get home and will give a feedback. Thank you very much !