我正在使用 apt-cacher-ng 来缓存 LAN 上的软件包下载。我还在使用 Ubuntu Beta 字体 PPA,它需要密码才能访问。我一直收到错误
bjorn@bjorn-laptop-natty:~$ sudo apt-get update
[sudo] password for bjorn:
Ign http://extras.ubuntu.com natty InRelease
<snip>
Ign https://private-ppa.launchpad.net natty/main amd64 Packages/DiffIndex
Ign https://private-ppa.launchpad.net natty/main TranslationIndex
Err https://private-ppa.launchpad.net natty/main Sources
Failed to connect to 0.0.7.209: Invalid argument
Err https://private-ppa.launchpad.net natty/main amd64 Packages
Failed to connect to 0.0.7.209: Invalid argument
Ign https://private-ppa.launchpad.net natty/main Translation-en_US
Ign https://private-ppa.launchpad.net natty/main Translation-en
Hit http://us.archive.ubuntu.com natty Release.gpg
Hit http://us.archive.ubuntu.com natty-updates Release.gpg
<snip>
Ign http://security.ubuntu.com natty-security/universe Translation-en
Fetched 72 B in 7s (10 B/s)
W: Failed to fetch https://private-ppa.launchpad.net/ubuntu-font-beta-testing/ppa/ubuntu/dists/natty/main/source/Sources Failed to connect to 0.0.7.209: Invalid argument
W: Failed to fetch https://private-ppa.launchpad.net/ubuntu-font-beta-testing/ppa/ubuntu/dists/natty/main/binary-amd64/Packages Failed to connect to 0.0.7.209: Invalid argument
E: Some index files failed to download. They have been ignored, or old ones used instead.
如果我禁用 apt-cacher-ng,它就可以正常工作。它说正在尝试连接到 0.0.7.209,这似乎很奇怪;我很确定这不是 launchpad 的 PPA 的地址。我不想总是更改设置来检查更新,那么如何让 apt-cacher-ng 和密码 PPA 一起工作呢?
答案1
您可以使用下面的行/etc/apt/apt.conf
或配置文件中的以下行绕过某些主机的 apt-cacher-ng:/etc/apt/apt.conf.d/
Acquire::HTTP::Proxy::archive.example.org "DIRECT";