Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I set up a local repository with the following file structure:

/var/www/html/dists$ find . -name "*"
.
./boston
./boston/main
./boston/main/binary-amd64
./boston/main/binary-amd64/python-openvswitch_2.1.2-51_all.deb
./boston/main/binary-amd64/Packages.gz
./boston/main/binary-amd64/openvswitch-switch_2.1.2-51_amd64.deb
./boston/main/binary-amd64/openvswitch-datapath-dkms_2.1.2-51_all.deb
./boston/main/binary-amd64/openvswitch-common_2.1.2-51_amd64.deb

The /etc/apt/sources.list has the following entry

deb http://10.209.0.10 boston main

However the apt-get update fails with the following message:

sudo apt-get update

Ign http://10.209.0.10 boston Release.gpg
Ign http://10.209.0.10 boston Release
Ign http://10.209.0.10 boston/main TranslationIndex
Err http://10.209.0.10 boston/main amd64 Packages
403  Forbidden
Ign http://10.209.0.10 boston/main Translation-en_US
Ign http://10.209.0.10 boston/main Translation-en
W: Failed to fetch http://10.209.0.10/dists/boston/main/binary-amd64/Packages  403      Forbidden

There is no Packages file but there is Packages.gz. When I monitor the apache log, there is no activity shown.

The output of apt-get update --print-uris is:

'10.209.0.10/dists/boston/main/binary-amd64/Packages.bz2';  '10.209.0.10_dists_boston_main_binary-amd64_Packages 0 : 
'10.209.0.10/dists/boston/main/i18n/Index.bz2'; 10.209.0.10_dists_boston_main_i18n_Index 0 : 
'10.209.0.10/dists/boston/Release'; 10.209.0.10_dists_boston_Release 0 
'10.209.0.10/dists/boston/Release.gpg'; 10.209.0.10_dists_boston_Release.gpg 0 

I created the Packages.gz with the following command:

dpkg-scanpackages binary-amd64 > /dev/null | gzip > binary-amd64/Packages.gz 

based on the Debian HowTo. I added a Release file:

/var/www/html/dists/boston$ cat Release 
Archive: boston 
Version: 2.1.2 
Component: main 
Origin: kam 
Label: kam 
Architecture: amd64 
MD5Sum: 
 4059d198768f9f8dc9372dc1c54bc3c3 14 main/binary-amd64/Packages.gz

Any ideas on debugging this problem?

Thanks,

share|improve this question
1  
What does apt-get update --print-uris say? (That command doesn't need sudo.) –  muru Jul 31 at 20:02
    
'10.209.0.10/dists/boston/main/binary-amd64/Packages.bz2'; 10.209.0.10_dists_boston_main_binary-amd64_Packages 0 : '10.209.0.10/dists/boston/main/i18n/Index.bz2'; 10.209.0.10_dists_boston_main_i18n_Index 0 : '10.209.0.10/dists/boston/Release'; 10.209.0.10_dists_boston_Release 0 '10.209.0.10/dists/boston/Release.gpg'; 10.209.0.10_dists_boston_Release.gpg 0 –  user310399 Jul 31 at 20:07
    
I created the Packages.gz with the following command: dpkg-scanpackages binary-amd64 > /dev/null | gzip > binary-amd64/Packages.gz based on the following documentation debian.org/doc/manuals/apt-howto/… –  user310399 Jul 31 at 20:11
    
It relies on the Release file to know which type of Packages file to look for, and in your case the Release file doesn't exist. Try creating one. Check out debian.org/doc/manuals/repository-howto/… –  muru Jul 31 at 20:21
    
I added Release file under binary-amd64 directory but it didn't help. Should the Release file be present in every sub-directory. I still don't understand why it is looking for Packages file –  user310399 Jul 31 at 20:43

1 Answer 1

up vote 0 down vote accepted

I think that that proxy is the fail, edit the file /etc/apt/apt.conf

Acquire::http::proxy "http://user:pass@proxyIP:8080/"

Hope it works :)

In my case, the node was brought up using Juju which had put MAAS server as the proxy. Once I deleted that entry, the apt-get update started working.

share|improve this answer
    
I am not behind a proxy. It is not even working if I try from the same machine using file:// instead of http:// .Not sure why it is looking for Packages file. –  user310399 Jul 31 at 20:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.