Я использую Ubuntu 10.4.04 LTS в VMware5. Я использовал автоматическую настройку прокси, и я могу использовать Интернет из 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)
Спасибо за ваш ответ!
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
Теперь это работает!
По какой-то причине мой URL-адрес прокси не удается подключиться, но я открыл proxy.pac
и добавил ВСЕ URL-адреса прокси в apt.conf
.