GNU/Linux >> LINUX-Kenntnisse >  >> Ubuntu

So beheben Sie Ubuntu apt-bleibt bei 0 hängen [Verbinden mit us.archive.ubuntu.com]

So beheben Sie Ubuntu apt-get bleibt bei 0 hängen [Verbinden mit us.archive.ubuntu.com]

Wenn ich ein Upgrade durchführe, bleibt es hier hängen:

[email protected]:~# sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  bind9-host coreutils cpio curl dnsutils libbind9-90 libc-bin libc-dev-bin
  libc6 libc6-dev libcgmanager0 libcurl3 libcurl3-gnutls libdns100
  libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libisc95 libisccc90
  libisccfg90 libjasper1 liblwres90 libplymouth2 libsepol1 libssl-dev
  libssl-doc libssl1.0.0 linux-libc-dev mime-support multiarch-support ntp
  ntpdate openssl plymouth plymouth-theme-ubuntu-text python3-distupgrade
  ubuntu-release-upgrader-core unzip
39 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 16.0 MB of archives.
After this operation, 12.3 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
0% [Connecting to us.archive.ubuntu.com (2001:67c:1562::15)] ░

Wenn ich aktualisiere, bleibt es hier hängen:

[email protected]:~# apt-get update
0% [Connecting to us.archive.ubuntu.com (2001:67c:1562::14)] [Connecting to sec░

Ich kann us.archive.ubuntu.com problemlos anpingen:

[email protected]:~# ping us.archive.ubuntu.com
PING us.archive.ubuntu.com (91.189.91.23) 56(84) bytes of data.
64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=1 ttl=54 time=81.5 ms
64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=2 ttl=54 time=81.5 ms
64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=3 ttl=54 time=81.5 ms
64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=4 ttl=54 time=81.4 ms
^C
--- us.archive.ubuntu.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 81.425/81.528/81.582/0.355 ms

Was kann ich tun, um das zu beheben?

Lösung:

wie man apt-get wieder zum Laufen bringt.

Bearbeiten Sie gai.conf :

sudo vim /etc/gai.conf

ändern Sie Zeile ~54, um Folgendes zu entkommentieren:

precedence ::ffff:0:0/96  100

schreibe und beende:

:wq

Wenn Sie während des Vorgangs ein Problem festgestellt haben, kommentieren Sie es unten.


Ubuntu
  1. So beheben Sie den Fehler apt-get Failed to Fetch in nicht unterstützten Ubuntu-Versionen

  2. So reparieren Sie defekte Pakete in Ubuntu 20.04

  3. Wie aktualisiere ich Ubuntu manuell?

  4. So reparieren Sie beschädigte Pakete unter Ubuntu 16.04 und Debian 9

  5. Wie verwalten Sie Pakete in Ubuntu?

So installieren Sie PeaZip 6.0.3 Archive Manager auf Ubuntu 16.04

Fehlerbehebung:Keine Unity, kein Launcher, kein Dash in Ubuntu Linux

So beheben Sie den Apt-Get GPG-Fehler NO_PUBKEY Ubuntu 14

So beheben Sie den GPG-Fehler BADSIG bei apt-get update unter Ubuntu oder Debian

So installieren Sie NCDU unter Ubuntu 17.04

So installieren Sie JuliaLang unter Ubuntu 16.04 LTS