Parece que você configurou apt
para usar um proxy de armazenamento em cache na intranet do seu local de trabalho. Quando você não está conectado a essa rede, as configurações de proxy são inválidas e as atualizações / instalações falharão.
A melhor maneira de corrigir isso dependerá da frequência com que você atualiza seu sistema no trabalho versus o contrário do trabalho:
-
Se você costuma atualizar no trabalho, mas deseja executar
apt-get
ocasionalmente quando está conectado a outra rede, deve conseguir substituir a configuração na linha de comando adicionando-o Acquire::http::Proxy=false
ao comando, por exemplo,sudo apt-get -o Acquire::http::Proxy=false update
-
Se você raramente usa o proxy de trabalho, então você pode considerar removê-lo ou desativá-lo: provavelmente é mais fácil usar o gerenciador de pacotes
synaptic
, indo para Configurações - > Preferências e, em seguida, selecionando a aba Rede e certificando-se de que está definida paraDirect connection to the internet
:Sevocênãotem
synaptic
,podeeditarasconfiguraçõesdeproxymanualmente-vocêdeveencontrá-lasnoarquivo/etc/apt/apt.conf
ouemumdosfragmentosem/etc/apt/apt.conf.d/
eprovavelmenteseráparecidocomAcquire::http::Proxy"http://aptcache.intranet.ics:3142"
que você pode comentar ou definir explicitamente como
Acquire::http::Proxy DIRECT
-
Se você quiser que
apt
detecte automaticamente se o proxy especificado está disponível e faça uma conexão direta se não estiver, então, aparentemente, há uma maneira de fazer isso também - veja esta resposta anterior em Como ignorar um proxy se não estiver disponível?