apt-file update: No Index available

4

0

Why do I get this message (“No Index available”):

Downloading Index http://http.debian.net/debian/dists/wheezy/main/Contents-amd64.diff/Index:
No Index available.
Downloading complete file http://http.debian.net/debian/dists/wheezy/main/Contents-amd64.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0 20.4M    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
File is up-to-date.

user289814

Posted 2014-07-29T23:05:06.480

Reputation:

Answers

1

Try to update /etc/apt/sources.list eventually you can generate a list from here.

When I tried to check the link "http://http.debian.net/debian/dists/wheezy/main/" the browser redirected me to a local mirror ( it depends from the nation from where I'm connected). It happens that the file that throw the error misses in this repository too.

So the suggestion is to use different set of sources and then to run the following commands with sudo or as privileged user (even without sudo)

  sudo apt-get clean  
  sudo apt-get update  

Eventually you may find useful to clean by hands the directory

  sudo rm -r /var/cache/apt/archives/partial/*

Hastur

Posted 2014-07-29T23:05:06.480

Reputation: 15 043

That's weird how man apt-get only mentions cleaning /var/cache/apt/archives/ but doesn't mention deleting the pkgcache files, though it does ("simulate" indicates it'll Del /var/cache/apt/pkgcache.bin /var/cache/apt/srcpkgcache.bin). I wonder if update on it's own would remove no longer needed/available info, or if it leaves old removed repo info – Xen2050 – 2014-12-17T08:13:38.210

with sudo apt-get clean it should be able to clean the whole /var/cache/apt/* tree and not only the local archive for packages. – Hastur – 2014-12-17T10:13:12.493

Read a bug report about apt-get clean's new "feature", it's still undocumented too. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=661947

– Xen2050 – 2014-12-17T10:44:08.357

Maybe it's a problem of version; running man apt-get version 1.0 for ubuntu (compiled Oct 28 2014 20:55:14 ) it gives "clean clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/". – Hastur – 2014-12-17T13:44:53.720

Yes, you see the problem is /var/cache/apt/pkgcache.bin is outside of /var/cache/apt/archives/ – Xen2050 – 2014-12-17T13:48:12.690

I agree, I think it remains hidden in the phrase clears out the local repository of retrieved package file s, implying index and bin files too. They could be more clear. – Hastur – 2014-12-17T16:30:55.573