Wednesday, January 6, 2021

Fix Repository Problem in KALI

 



Now - a - days most are facing Repository problems in kali Linux . So I am here to solve that lets go !!! Mostly these problem occurs in two stage they are 



1.Different Time / Region 


2. Having # in sources. List file 


 

The error we face in repositories are :


1.sudo apt-get install, update, upgrade will not work 


2.E: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease 403 Forbidden.


3.release file for http //http.kali.org/kali/dists/kali-rolling/inrelease is not valid yet


If you people get this error try these steps .

 

OK !! Lets see solution for these problem 



Method - 1


1.Change of time  


root💀kali # date -s "01/01/2020 10:58"


* Change of zone 


root💀kali #  dpkg-reconfigure tzdata. 


Now you can change or set your region.

 


Method -2


2.Having # in sources. List file


Type 


(root💀kali)-[/home/kali]

└─# nano /etc/apt/sources.list


If you got result like this 

👉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

 

🔧🔨 Remove that # in the second line and save that.

press

1.ctrl + o

2.enter

3.And finally ctrl + x to exit

 


Method - 3



After doing all those stuff again you are getting error you can change your repositories 🔎. You can add repositories simple in terminal or add by access the sources.list file.


echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee /etc/apt/sources.list

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

echo "deb http://http.kali.org/kali kali-experimental main non-free contrib" | sudo tee -a /etc/apt/sources.list

​​echo "deb-src http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee -a /etc/apt/sources.list

 

COPY THESE COMMENT AND PASTE IN TERMINAL ONE BY ONE THATS ALL. Thank you


 

No comments:

Post a Comment