ars*_*012 5 package-management apt networking proxy
我最近切换到 Ubuntu 15.10。
我需要使用代理连接到外部互联网。在我的本地互联网上,有一个不需要代理连接的存储库。
所以我在 /etc/apt/apt.conf.d/proxy 写了这样的东西
Acquire::http::Proxy::google.com "http://XXX:8087";
Acquire::http::Proxy::spotify.com "http://XXX:8087";
Run Code Online (Sandbox Code Playgroud)
不幸的是,这不起作用,apt-get update 说无法连接 google Spotify。我也试过把它改成这个。
Acquire::http::Proxy "http://XXX:8087";
Run Code Online (Sandbox Code Playgroud)
我现在可以连接到 google 和 Spotify,但我无法连接到我的本地存储库。没有更好的解决方法吗?
创建一个文件:/etc/apt/apt.conf.d/99proxy并在此文件中插入以下内容:
Acquire::http::Proxy {
your.local.repository DIRECT;
};
Run Code Online (Sandbox Code Playgroud)
这告诉 apt 使用直接连接(而不是通过代理)来访问您的本地存储库。
更改your.local.repository到本地存储库的正确位置。
| 归档时间: |
|
| 查看次数: |
2104 次 |
| 最近记录: |