Failed to fetch update on Ubuntu 14.04 LTS (Trusty Tahr) [closed]

筅森魡賤 提交于 2019-12-04 04:48:23

This worked for me:

rm /var/lib/apt/lists/* -vf
apt-get update

Hope it helps someone else. Cheers!

There are many problem due to which this issue has come. Some of then are :

  1. Any entry in you apt.list is not working. You or any application has created a wrong entry.
  2. apt repository are not currently working.
  3. Corrupt in /var/lib/apt/lists/ folder.

So for both of them there are different solution, if you didn't know the exact problem then follow following steps:

  1. Use another mirrors of apt. In ubuntu there is file name /etc/apt/sources.list and folder containing some files in /etc/apt/sources.list.d/. So, from there you can change use any other mirrors of apt. Like you can change your India repository to US repository, etc. by editing these files.
  2. There is another possibility too that you having any other repository link (third party) which is not responding for the moment. So, you can also delete them from the above given files. You can also remove all third party repositories from list

    rm -rf /etc/apt/sources.list.d/*

  3. Remove all contents from /var/lib/apt/lists/

    rm -rf /var/lib/apt/lists/*

Something is up with the us.archive.ubuntu.com server.

I fixed it by changing all of the us.archive.ubuntu.com urls to in.archive.ubuntu.com in /etc/apt/sources.list

I used vim with find and replace like this:

sudo vim /etc/apt/sources.list
:%s/us.archive/in.archive/g
:wq
Dat TT

I had this issue on my ubuntu on virtualbox before. I tried all above but that won't help.

When I worked on other backup script and I recognized that my server had incorrect date/time. I have change that and the apt-get update works like a charm.

The following command should work

sed -i -re 's/\w+\.archive\.ubuntu\.com/archive.ubuntu.com/g' /etc/apt/sources.list
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!