我正在建立一个私有APT存储库,用于将应用程序部署到服务器集群.我已经使用reprepro设置了存储库,基本上遵循了这里的说明,但是使用了预先生成的GPG密钥.
但是,在目标服务器上运行apt-get update时,我不断收到此错误:
W: Failed to fetch http://domU-xx-xx-xx-xx-xx-xx.compute-1.internal/aptrepo/dists/oneiric/non-free/i18n/Index
No Hash entry in Release file /var/lib/apt/lists/partial/domU-xx-xx-xx-xx-xx-xx.compute-1.internal_aptrepo_dists_oneiric_non-free_i18n_Index
Run Code Online (Sandbox Code Playgroud)
我需要担心吗?如果我这样做,我该如何解决?
小智 5
我有一段时间没遇到这个问题而且我们的自动构建失败并且谷歌搜索没有给我们什么.我们发现的问题是我们的网络服务器配置问题.我们使用以下方式构建仓库:
reprepro -V --ignore=wrongdistribution -b repository include precise <some-package.changes>
Run Code Online (Sandbox Code Playgroud)
然后我们将存储库目录映射到nginx站点.默认的nginx设置具有导致我们痛苦的以下配置:
try_files $uri $uri/ index.html;
Run Code Online (Sandbox Code Playgroud)
这是将所有文件映射到资源,然后将未找到的任何内容映射到index.html页面.因此,当apt正在寻找dist/main/i18n/Index时,它正在接收HTTP 200,但该文件不是apt所期望的,因此错误.我们用以下命令替换了config的try_files部分:
server {
...
location / {
...
try_files $uri $uri/; # index.html;
...
}
...
}
Run Code Online (Sandbox Code Playgroud)
然后所有对*/i18n/Index的请求都返回了一些HTTP错误代码,然后它没有打算尝试解析它们,问题就消失了.不知道这是否对你有所帮助,但它引起了我们2小时的痛苦,试图弄清楚我们的debs或我们的回购,但我们的网络服务器没有问题.
| 归档时间: |
|
| 查看次数: |
729 次 |
| 最近记录: |