Интернет-соединение через прокси установлено, но не работает

Моя машина находится за прокси-сервером (не знаю, какой тип, доступен через http, учетные данные пользователя не требуются), который настраивается автоматически.

Я подключен к Интернету, но, похоже, только Firefox может разрешать URL-адреса. APT нет.

Похоже, что прокси позволяет Firefox разрешать имена, но не другим приложениям? Можно ли как-то настроить apt, чтобы обойти это ограничение?

Когда я вручную ввожу IP-адрес de.archive.ubuntu.com в sources.list, я получаю сообщение об ошибке «Нет маршрута к хосту».

На данный момент прокси-сервер настроен с графическим интерфейсом Ubuntus.

Opt of apt:

Err:1 http://security.ubuntu.com/ubuntu cosmic-security InRelease
  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

Err:2 http://de.archive.ubuntu.com/ubuntu cosmic InRelease
  Something wicked happened resolving 'de.archive.ubuntu.com:http' (-5 - No address associated with hostname)

Err:3 http://de.archive.ubuntu.com/ubuntu cosmic-updates InRelease
  Something wicked happened resolving 'de.archive.ubuntu.com:http' (-5 - No address associated with hostname)

Err:4 http://de.archive.ubuntu.com/ubuntu cosmic-backports InRelease
  Something wicked happened resolving 'de.archive.ubuntu.com:http' (-5 - No address associated with hostname)

Reading package lists... Done

Building dependency tree

Reading state information... Done

All packages are up to date.

W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/cosmic/InRelease  Something wicked happened resolving 'de.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/cosmic-updates/InRelease  Something wicked happened resolving 'de.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://de.archive.ubuntu.com/ubuntu/dists/cosmic-backports/InRelease  Something wicked happened resolving 'de.archive.ubuntu.com:http' (-5 - No address associated with hostname)

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/cosmic-security/InRelease  Something wicked happened resolving 'security.ubuntu.com:http' (-5 - No address associated with hostname)

W: Some index files failed to download. They have been ignored, or old ones used instead.
0
задан 29 April 2019 в 11:12

1 ответ

Firefox (как и другие браузеры) имеет свои собственные настройки внутреннего прокси. Приложения CLI, такие как apt-get, этого не видят, они используют переменную среды http_proxy (да, строчные буквы, AFAIK):

export http_proxy="http://PROXY_SERVER:PORT"
0
ответ дан 29 April 2019 в 11:12

Другие вопросы по тегам:

Похожие вопросы: