apt-get 更新本地存储库时出错

apt-get 更新本地存储库时出错

我建立了一个具有以下文件结构的本地存储库:

/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

/etc/apt/sources.list 有以下条目

deb http://10.209.0.10 boston main

但是 apt-get 更新失败并显示以下消息:

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

没有 Packages 文件,但有 Packages.gz。当我监控 apache 日志时,没有显示任何活动。

的输出apt-get update --print-uris为:

'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 

Packages.gz使用以下命令创建了:

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

基于Debian 操作指南。我添加了一个Release文件:

/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

对于调试这个问题有什么想法吗?

谢谢,

答案1

我认为该代理失败了,编辑文件/etc/apt/apt.conf

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

希望它有效:)

在我的例子中,节点是使用 Juju 启动的,Juju 将 MAAS 服务器作为代理。删除该条目后,apt-get update 开始工作。

相关内容