Overcoming Ubuntu Mirror Issues: Quick Tips for Restoring Package Installations
M Usman Shamshad
DevOps Engineer @KresusLabs | Microsoft Azure | Azure DevOps | Docker | CD/CD | Terraform | Kubernetes | Git | Linux | Scripting | Bash | Ansible | Jenkins | Automation | Python
?? Attention Ubuntu Users: Are You Facing Issues Installing Packages or updating the system? ??
Recently, I encountered a frustrating issue while trying to install packages on Ubuntu: the pk.archive.ubuntu.com server was down, causing all my package installations to fail. If you’re running into errors like:
Could not connect to pk.archive.ubuntu.com:80 - connect (113: No route to host)
Unable to fetch some archives...
Don’t worry—you’re not alone! The pk.archive.ubuntu.com server, which is a mirror for Ubuntu package archives in Pakistan, can sometimes be unavailable or slow to respond possibly due to recent firewall installation in Pakistan. This can prevent you from downloading or updating packages.
?? Here’s How to Resolve It:
1. Switch to a Different Mirror:
Ubuntu uses a unique format where sources are stored in .sources files in the /etc/apt/sources.list.d/ directory. You can change the mirror to a more reliable one:
??- Open the relevant .sources file:
????sudo nano /etc/apt/sources.list.d/ubuntu.sources
?- Replace pk.archive.ubuntu.com with another mirror, such as archive.ubuntu.com or a local mirror closer to your region:
????URIs: [ "https://archive.ubuntu.com/ubuntu" ]
2. Update Your Package List:
??- After making the changes, save the file, update your package list, and proceed with your installations:
????sudo apt-get update
????sudo apt-get install <your-package-name>
Switching to a different mirror can quickly resolve the issue and get your package installations back on track. Feel free to share/repost this article if you think it might help others in the community! ???
#Ubuntu #Linux #OpenSource #TechTips #DevOps #SysAdmin #ITSupport #UbuntuMirror
CTO, DevOps, React Developer, Linux Administrator
7 个月It wasted our entire day to investigate that. It looks like it is related to the internet issue in Pakistan.
DevSecOps Engineer @ CCJK Technologies| Cloud Engineer | Terraform, Git, Docker, Ansible, Jenkins, Kubernetes | AWS Solutions Architect certified | CCNA certified | Certified Ethical Hacker |
7 个月I have already fixed this.