我在 VMware5 中使用 Ubuntu 10.4.04 LTS。我使用了自动代理配置,并且能够通过 Firefox 使用互联网。当我想更新时apt-get update
,我收到以下错误。以下链接提供了一些解决方案,但我没有任何端口号,因为我正在使用自动代理
https://answers.launchpad.net/uck/+question/108860。
错误:
Ign http security.ubuntu.com lucid-security multiverse Packages
Ign http security.ubuntu.com lucid-security multiverse Sources
Ign http security.ubuntu.com lucid-security main Packages
Err http security.ubuntu.com lucid-security main Packages
Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http security.ubuntu.com lucid-security/restricted Packages
Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http security.ubuntu.com lucid-security/main Sources
Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http security.ubuntu.com lucid-security/restricted Sources
Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
Err http security.ubuntu.com lucid-security/universe Packages
Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
W: Failed to fetch http security.ubuntu.com/ubuntu/dists/lucid-security/Release.gpg Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
W: Failed to fetch http security.ubuntu.com/ubuntu/dists/lucid-security/main/i18n/Translation-en_US.bz2 Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
W: Failed to fetch http security.ubuntu.com/ubuntu/dists/lucid-security/restricted/i18n/Translation-en_US.bz2 Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)
感谢您的答复!
答案1
apt-get
不使用全局代理设置。尝试将代理设置添加到/etc/apt/apt.conf
:
Acquire::http::proxy "http://<your-proxy-url>";
或者只需在终端中运行以下命令:
sudo su
echo 'Acquire::http::proxy "http://<your-proxy-url>";' >> /etc/apt/apt.conf
答案2
现在它起作用了!
由于某种原因,我的代理网址无法连接,但我打开proxy.pac
并添加了全部中的代理 URL apt.conf
。