Comme n tas d’autres questions , je ne peux pas exécuter apt-get update
de temps en temps . Redémarrer ou attendre un moment fait disparaître le problème. Je n'ai jamais de problèmes de ping ou de visite des URL respectives dans un navigateur.
J'ai essayé toutes les réponses positives en vain. Que fait apt
qui est si différent de ping
ou de mon navigateur? Par exemple, quand je lance apt-get update
, je vois ceci:
Err:1 https://download.docker.com/linux/ubuntu xenial InRelease
Could not resolve Host: download.docker.com
Err:2 https://deb.opera.com/opera-stable stable InRelease
Could not resolve Host: deb.opera.com
Err:3 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu xenial InRelease
Could not resolve 'ppa.launchpad.net'
Err:4 http://ppa.launchpad.net/saiarcot895/myppa/ubuntu xenial InRelease
Could not resolve 'ppa.launchpad.net'
Err:5 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial InRelease
Could not resolve 'ppa.launchpad.net'
Err:6 http://repository.spotify.com stable InRelease
Could not resolve 'repository.spotify.com'
Err:7 http://dl.google.com/linux/chrome/deb stable InRelease
Could not resolve 'dl.google.com'
Err:8 http://archive.ubuntu.com/ubuntu xenial InRelease
Could not resolve 'archive.ubuntu.com'
Err:9 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Could not resolve 'archive.ubuntu.com'
Err:10 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Could not resolve 'archive.ubuntu.com'
Err:11 http://archive.ubuntu.com/ubuntu xenial-security InRelease
Could not resolve 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease Could not resolve 'archive.ubuntu.com'
W: Failed to fetch https://download.docker.com/linux/ubuntu/dists/xenial/InRelease Could not resolve Host: download.docker.com
W: Failed to fetch http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu/dists/xenial/InRelease Could not resolve 'ppa.launchpad.net'
W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/InRelease Could not resolve 'dl.google.com'
W: Failed to fetch https://deb.opera.com/opera-stable/dists/stable/InRelease Could not resolve Host: deb.opera.com
W: Failed to fetch http://ppa.launchpad.net/saiarcot895/myppa/ubuntu/dists/xenial/InRelease Could not resolve 'ppa.launchpad.net'
W: Failed to fetch http://repository.spotify.com/dists/stable/InRelease Could not resolve 'repository.spotify.com'
W: Failed to fetch http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu/dists/xenial/InRelease Could not resolve 'ppa.launchpad.net'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Lancer ping download.docker.com
:
PING d2h67oheeuigaw.cloudfront.net (52.85.41.233) 56(84) bytes of data.
64 bytes from server-52-85-41-233.mel50.r.cloudfront.net (52.85.41.233): icmp_seq=1 ttl=251 time=18.8 ms
64 bytes from server-52-85-41-233.mel50.r.cloudfront.net (52.85.41.233): icmp_seq=2 ttl=251 time=18.4 ms
64 bytes from server-52-85-41-233.mel50.r.cloudfront.net (52.85.41.233): icmp_seq=3 ttl=251 time=19.5 ms
Et visiter la page dans mon navigateur fonctionne bien. Comment puis-je faire apt-get
"juste travailler"?
Voici le contenu de mon /etc/apt/resolv.conf
:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search home.gateway
Exécutez cette commande depuis le terminal et vous pourrez utiliser apt
et apt-get
normalement à l'avenir :)
echo 'Acquire::ForceIPv4 "true";' | Sudo tee /etc/apt/apt.conf.d/99force-ipv4
Si /etc/atp/apt.conf
existe, copiez le fichier, puis éditez l'original pour commenter la ligne suivante:
Acquire::http::Proxy "http://proxyaddress:proxyport";