low*_*key 4 http-proxy debian proxy
在 Debian 的安装过程中,我被要求提供一个格式为 的标准代理字符串http://user:password@host:port/,我输入了该字符串。apt-get 在更新期间运行并检索文件,现在 Debian 已安装。但是,当我尝试运行时sudo apt-get install ...,我收到一条错误消息,其中包含我在安装过程中输入的主机Could not resolve proxy_host在哪里的消息proxy_host。
还有其他地方需要设置代理信息吗?
小智 6
以下是通用代理,apt 和 wget,您可以删除user:password@不需要它的代理:
对于一般代理:
touch /etc/profile.d/proxy.sh
Run Code Online (Sandbox Code Playgroud)
添加以下内容:
export ftp_proxy=ftp://user:password@host:port
export http_proxy=http://user:password@host:port
export https_proxy=https://user:password@host:port
export socks_proxy=https://user:password@host:port
Run Code Online (Sandbox Code Playgroud)
对于 APT 代理:
touch /etc/apt/apt.conf.d/99HttpProxy
Run Code Online (Sandbox Code Playgroud)
添加以下内容:
Acquire::http::Proxy "http://user:password@host:port";
Run Code Online (Sandbox Code Playgroud)
对于 wget:
nano /etc/wgetrc
Run Code Online (Sandbox Code Playgroud)
查找并取消注释代理行或添加它们(如果不存在)
http_proxy = http://user:password@host:port
https_proxy = ...
...
Run Code Online (Sandbox Code Playgroud)
在设置期间输入的 http 代理信息应该(通常)最终出现在文件中/etc/apt/apt.conf
Acquire::http::Proxy "http://user:password@host:port/";
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
81091 次 |
| 最近记录: |