1

suddenly apt-get update began to fail, while investigating i came across a strange behavior:

$ cat /etc/apt/sources.list
deb http://il.archive.ubuntu.com/ubuntu/ trusty main restricted

$ apt-get update
Ign http://il.archive.ubuntu.com trusty InRelease
Hit http://il.archive.ubuntu.com trusty Release.gpg
Hit http://il.archive.ubuntu.com trusty Release
Hit http://il.archive.ubuntu.com trusty/main amd64 Packages
Hit http://il.archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://il.archive.ubuntu.com trusty/main Translation-en
Hit http://il.archive.ubuntu.com trusty/restricted Translation-en
Ign http://il.archive.ubuntu.com trusty/main Translation-en_US
Ign http://il.archive.ubuntu.com trusty/restricted Translation-en_US
Reading package lists... Done

$ sed -i 's/il/us/g' /etc/apt/sources.list
$ cat /etc/apt/sources.list
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted

$ apt-get update
Ign http://us.archive.ubuntu.com trusty InRelease
Get:1 http://us.archive.ubuntu.com trusty Release.gpg [72 B]
Get:2 http://us.archive.ubuntu.com trusty Release [11.9 kB]
Get:3 http://us.archive.ubuntu.com trusty/main amd64 Packages [14 B]
Fetched 12.0 kB in 0s (20.6 kB/s)
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty/Release  Unable to find expected entry 'restricted/binary-amd64/Packages' in Release file (Wrong sources.list entry or malformed file)

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

i thought that the prefix (il or us) just indicates which cdn of official ubuntu repository to use. can it be that there is a difference between official ubuntu apt repositories?

UPDATE:

i headed to ubuntu source list generator to regenerate the ubuntu source list (without 'restricted' brach), in order to verify whether the urls are correct -- as shown below, the only thing that differs is the regional suffix, which matches the snippet above.

$ curl -s https://repogen.simplylinux.ch/txt/sources_abed64b7b6ab23d5c4ffe668bbe70d3c37144a3a.txt | grep ^deb && curl -s https://repogen.simplylinux.ch/txt/sources_99dc7e2a260ff96dbe49910f005d2ab82862458e.txt | grep ^deb
deb http://il.archive.ubuntu.com/ubuntu/ trusty main 
deb http://us.archive.ubuntu.com/ubuntu/ trusty main 

UPDATE 2:

it is reproducible to me. who should be informed?

UPDATE 3:

here are some more details:

$ dpkg --print-architecture
amd64

$ wget -q -O- http://us.archive.ubuntu.com/ubuntu/dists/trusty/Release | grep 'restricted/binary-amd64/Packages'
$ echo $?
1

$ dig us.archive.ubuntu.com | grep IN
;us.archive.ubuntu.com.     IN  A
us.archive.ubuntu.com.  57  IN  A   91.189.91.15
us.archive.ubuntu.com.  57  IN  A   91.189.91.24
us.archive.ubuntu.com.  57  IN  A   91.189.91.23
us.archive.ubuntu.com.  57  IN  A   91.189.91.13
us.archive.ubuntu.com.  57  IN  A   91.189.91.14
Mr.
  • 415
  • 1
  • 9
  • 21

1 Answers1

0

https://askubuntu.com/a/37754 solved my issue. enclosed a short snippet from the original answer:

on the top in your /etc/apt/sources.list file should be all that is needed to make it automatically pick a mirror for you based on your geographical location.

deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main restricted universe multiverse
Mr.
  • 415
  • 1
  • 9
  • 21