下面是清華源執行後的情況
Ign:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy InRelease
Ign:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates InRelease
Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports InRelease
Ign:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security InRelease
Ign:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy InRelease
Ign:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates InRelease
Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports InRelease
Ign:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security InRelease
Ign:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy InRelease
Ign:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates InRelease
Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports InRelease
Ign:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security InRelease
Ign:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Err:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy InRelease
Cannot initiate the connection to mirrors.tuna.tsinghua.edu.cn:443 (2402:f000:1:400::2). - connect (101: Network is unreachable) Could not connect to mirrors.tuna.tsinghua.edu.cn:443 (101.6.15.130), connection timed out
Err:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates InRelease
Cannot initiate the connection to mirrors.tuna.tsinghua.edu.cn:443 (2402:f000:1:400::2). - connect (101: Network is unreachable)
Err:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-backports InRelease
Cannot initiate the connection to mirrors.tuna.tsinghua.edu.cn:443 (2402:f000:1:400::2). - connect (101: Network is unreachable)
Err:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-security InRelease
Cannot initiate the connection to mirrors.tuna.tsinghua.edu.cn:443 (2402:f000:1:400::2). - connect (101: Network is unreachable)
Err:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.39), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.36), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out
Ign:6 http://us.archive.ubuntu.com/ubuntu focal InRelease
Ign:7 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Ign:8 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Ign:6 http://us.archive.ubuntu.com/ubuntu focal InRelease
Ign:7 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Ign:8 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Ign:6 http://us.archive.ubuntu.com/ubuntu focal InRelease
Ign:7 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Ign:8 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Err:6 http://us.archive.ubuntu.com/ubuntu focal InRelease
Could not connect to banjo.canonical.com:80 (91.189.91.38), connection timed out Could not connect to kazooie.canonical.com:80 (91.189.91.39), connection timed out Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable)
Err:7 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable)
Err:8 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/jammy/InRelease Cannot initiate the connection to mirrors.tuna.tsinghua.edu.cn:443 (2402:f000:1:400::2). - connect (101: Network is unreachable) Could not connect to mirrors.tuna.tsinghua.edu.cn:443 (101.6.15.130), connection timed out
W: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/jammy-updates/InRelease Cannot initiate the connection to mirrors.tuna.tsinghua.edu.cn:443 (2402:f000:1:400::2). - connect (101: Network is unreachable)
W: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/jammy-backports/InRelease Cannot initiate the connection to mirrors.tuna.tsinghua.edu.cn:443 (2402:f000:1:400::2). - connect (101: Network is unreachable)
W: Failed to fetch https://mirrors.tuna.tsinghua.edu.cn/ubuntu/dists/jammy-security/InRelease Cannot initiate the connection to mirrors.tuna.tsinghua.edu.cn:443 (2402:f000:1:400::2). - connect (101: Network is unreachable)
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal/InRelease Could not connect to banjo.canonical.com:80 (91.189.91.38), connection timed out Could not connect to kazooie.canonical.com:80 (91.189.91.39), connection timed out Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable)
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable)
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to us.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable)
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.38), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.39), connection timed out Could not connect to security.ubuntu.com:80 (185.125.190.36), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.39), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead
解決方法:
-
新增如下內容
sudo vim /etc/resolv.conf
新增下面3行
nameserver 8.8.8.8
nameserver 127.0.0.1
options edns0
2. 輸入Esc,:wq,儲存並退出
3. 重啟networking
sudo /etc/init.d/networking restart
執行更新命令
sudo apt-get update