MyTetra Share
Делитесь знаниями!
'Some index files failed to download' while updating
Время создания: 13.07.2018 15:32
Текстовые метки: ubuntu index files failed download
Раздел: Ubuntu
Запись: Velonski/mytetra-database/master/base/1531466366vjs36vluxp/text.html на raw.githubusercontent.com

When running sudo apt-get update I get these following errors:


Err archive.ubuntu.com quantal InRelease

Err archive.ubuntu.com quantal-updates InRelease

Err archive.ubuntu.com quantal-backports InRelease

Err archive.ubuntu.com quantal-security InRelease

Err archive.ubuntu.com quantal Release.gpg

Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80]

Err archive.ubuntu.com quantal-updates Release.gpg

Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80]

Err archive.ubuntu.com quantal-backports Release.gpg

Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80]

Err archive.ubuntu.com quantal-security Release.gpg

Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80]

Reading package lists... Done

W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal/InRelease

W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-updates/InRelease

W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-backports/InRelease

W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-security/InRelease

W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal/Release.gpg Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80]

W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-updates/Release.gpg Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80]

W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-backports/Release.gpg Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80]

W: Failed to fetch archive.ubuntu.com/ubuntu/dists/quantal-security/Release.gpg Unable to connect to archive.ubuntu.com:http: [IP: 91.189.92.177 80]

W: Some index files failed to download. They have been ignored, or old ones used instead.

I am using Ubuntu 12.04. This is the command I used after installing Ubuntu from window installer. I am sure my laptop is connected to internet. What can I do now?


software-center 12.10 sudo software-sources

shareimprove this question

edited Oct 29 '12 at 9:06

asked Oct 29 '12 at 8:43


Rakesh Godhala

4901410

I removed http:// before all links.. So, they can't be seen as links – Rakesh Godhala Oct 29 '12 at 8:44

I didn't upated it.. It's a fresh install using a ubuntu-12.10-desktop-i386.iso file – Rakesh Godhala Oct 29 '12 at 9:05

I changed the software source to other near by servers and run the command again,still the same problem is repeating, with the exception archieve.ubuntu.com is replaced with mirror.cse.iitk.ac.in – Rakesh Godhala Oct 29 '12 at 9:09

I have an ubuntu server 12.04.1 as the master dns server including dhcpd. in my options file I had only the secondairy dns-server's ip in the allow query list, when I added 127.0.0.1 the same problem was fixed. Though, in the presented detection method (previous answer) I could not ping archive.ubuntu.com. – user123585 Jan 16 '13 at 4:01

add a comment

4 Answers

active oldest votes

up vote

2

down vote

accepted

Just open synaptic manager, install/reinstall ubuntu-extras-keyring and then (in terminal) type sudo apt-get update.


cheers u'd get out from this error.


shareimprove this answer

edited Jul 5 '13 at 19:41


guntbert

8,541123065

answered May 8 '13 at 7:52


user2045706

622

6

This did not work for me. Why would it? – pzkpfw Apr 14 '14 at 18:08

add a comment

up vote

19

down vote

As vasa1 pointed out, the server your system is configured to use to download packages for installation is currently down.


What to do when your download mirror is down...

The solution to this problem is to use change it to a different mirror (i.e., a different server).


Option 1: Using Graphical Configuration Utilities

Open Software Sources

Press Alt+F2, type gksu software-properties-gtk, and enter your password. (Alternatively, select Settings... at the lower left corner of the Update Manager, or go to Settings > Repositories in Synaptic).


That's for Ubuntu 10.04 LTS, which you are running. In later releases, you can just run software-properties-gtk and when you make changes, PolicyKit will authenticate you.

Most people using newer releases have the Software Center and not Synaptic. In the Software Center, you would go to Edit > Software Sources....

The Update Manager is unchanged, but in new releases is called the Software Updater.

Change the Download Server

In the Ubuntu Software tab of the Software Sources window, there is a drop-down menu labeled Download from. Select your regional server. For example, I'm in the United States and it looks like this on my 11.10 machine:


Software Sources window showing Server for United States being selected in the drop-down menu.

Software Sources window showing Sever for United States being selected in the "Download from" drop-down menu.


You may see other servers listed in that short list (like the server you currently have set up).


You can use the Main server too but it is almost always considerably slower than using your regional server. (At least in the United States, anyway.)


If you want to use another mirror, you can look through a list of mirrors by clicking Other....


Choose a Download Server dialog in Software Sources, for picking an alternative mirror


Option 2: Manually Editing a Configuration File

Back Up and Open sources.list

Back up your sources.list file and open it in a text editor:


cd /etc/apt

sudo cp sources.list sources.list.old

gksu gedit sources.list

If you've already ran the second line, don't do it again, unless you want to overwrite the old backup with a copy of the new configuration.

For a text-based editor (not requiring any GUI), replace the third line with sudo nano -w sources.list (or sudo vi sources.list, or sudo -e sources.list).

In the text editor, replace every instance of your old server name with the new server name. For example, you could replace every instance of ubuntuarchive.hnsdc.com with us.archive.ubuntu.com. (Your text editor, whichever you use, will facilitate this--you don't have to manually find each instance and type in the name of the new mirror.)


Save the file, quit the text editor, run sudo apt-get update, and it should work with the new server.


Option 3: Command Line Substitution

sed allows you to write simple (or complicated) scripts that act on a file, one line at a time. So you can issue a single command that goes through sources.list, replacing all the instances of the old server name with the new server name.


First, go into /etc/apt and (unless you did so recently) back up the file:


cd /etc/apt

sudo cp sources.list sources.list.old

Then run sed:


sudo cp sources.list sources.list.tmp

sed 's/ubuntuarchive.hnsdc.com/us.archive.ubuntu.com/' sources.list.tmp | sudo tee sources.list

sudo rm sources.list.tmp

For an old server besides ubuntuarchive.hnsdc.com, change that as appropriate.

For a new server besides us.archive.ubuntu.com, change that as appropriate.

I decided to copy sources.list into a temporary file and use that as sed's input. This is one way to ensure that sed is not overwriting the file while it's still reading it.

The sed "script" here is very simple. This explains how substitution works.

But what download servers are there?

There are over 400 registered Ubuntu mirrors for installing and updating software.


These are called archive mirrors. This should not be confused with CD mirrors, where ISO images and related files for installing Ubuntu are stored.


Many servers provide both, and are thus both archive mirrors and CD mirrors. But many are just one of the two.


shareimprove this answer

edited Apr 13 '17 at 12:24

community wiki

2 revs

Eliah Kagan

Shouldn't the answer also address "0 upgraded, 3 newly installed, 0 to remove and 21 not upgraded?" In other words, OP will want to do a dist-upgrade? – user25656 Jan 18 '13 at 2:34

@vasa1 There's no reason to think that will still be the case once sudo apt-get update is successfully run. It's based on information about available packages that is out of date. Also, just saying "run apt-get dist-upgrade" wouldn't be a sufficient response to that, as sometimes dist-upgrade does not resolve dependencies in a good way--important packages might end up removed. (Probably not, but it's important to inspect what it proposes to do, rather than running ahead with it.) If this issue persists, I think it would likely be best asked as a separate question. – Eliah Kagan Jan 18 '13 at 4:14

ThnQ .. It worked really well – Rakesh Godhala Nov 16 '13 at 2:36

Following option 3, I still get an error: some index files failed to download. – Igor G. Jul 24 '16 at 20:24

It should be noted that this could also happen if the repository no longer exists (permanently), when you update to a new version of Ubuntu, as well as many other reasons. – earthmeLon Feb 1 '17 at 20:07

add a comment

up vote

7

down vote

Either the mirror is down or you internet connection has issues (can be temporary).


make sure you can ping google DNS and archive.ubuntu.com:


ping -c3 archive.ubuntu.com

ping -c3 8.8.8.8


Both commands should return 0% packet loss in the statistics line. Else your internet connection is down.


If your connection seems fine then it is likely the mirror is down. Try choosing another one close to your location.


shareimprove this answer

answered Oct 29 '12 at 9:37


rosch

4,80411323

PING archive.ubuntu.com (91.189.92.156) 56(84) bytes of data. --- archive.ubuntu.com ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2015ms – Rakesh Godhala Oct 29 '12 at 9:56

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. --- 8.8.8.8 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 1999ms – Rakesh Godhala Oct 29 '12 at 9:58

I am getting 100% packet loss instead of 0% loss.. – Rakesh Godhala Oct 29 '12 at 9:59

Any suggestions?? – Rakesh Godhala Oct 29 '12 at 10:14

you have to first take care of your internet connection. These links might help: help.ubuntu.com/10.04/internet/C/connecting-wireless.html help.ubuntu.com/community/WifiDocs/WirelessTroubleShootingGuide – rosch Oct 29 '12 at 10:49

show 1 more comment

up vote

-2

down vote

Go Terminal and follow below steps for solution...


sudo su (login as root)

cd /var/lib/apt/lists/

rm -fr *

cd /etc/apt/sources.list.d/

rm -fr *

cd /etc/apt

sudo cp sources.list sources.list.old

sudo cp sources.list sources.list.tmp

sed 's/ubuntuarchive.hnsdc.com/us.archive.ubuntu.com/' sources.list.tmp | sudo tee sources.list

sudo rm sources.list.tmp*

apt-get clean

apt-get update

 
MyTetra Share v.0.59
Яндекс индекс цитирования