我使用 Ubuntu 18.04.4 当我运行“sudo apt-get update”时,出现以下错误。
Err:1 http://repo.mysql.com/apt/ubuntu bionic InRelease
Could not connect to repo.mysql.com:80 (23.213.169.17), connection timed out
Err:2 http://ny-mirrors.evowise.com/ubuntu bionic InRelease
Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:4b3). - connect (101: Network is unreachable) Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:5b3). - connect (101: Network is unreachable) Could not connect to ny-mirrors.evowise.com:80 (104.22.5.179), connection timed out Could not connect to ny-mirrors.evowise.com:80 (104.22.4.179), connection timed out
Err:3 http://ny-mirrors.evowise.com/ubuntu bionic-updates InRelease
Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:4b3). - connect (101: Network is unreachable) Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:5b3). - connect (101: Network is unreachable)
Err:4 http://ny-mirrors.evowise.com/ubuntu bionic-backports InRelease
Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:4b3). - connect (101: Network is unreachable) Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:5b3). - connect (101: Network is unreachable)
Err:5 http://ny-mirrors.evowise.com/ubuntu bionic-security InRelease
Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:4b3). - connect (101: Network is unreachable) Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:5b3). - connect (101: Network is unreachable)
Err:6 http://ppa.launchpad.net/samoilov-lex/aftl-stable/ubuntu artful InRelease
Cannot initiate the connection to ppa.launchpad.net:80 (2001:67c:1560:8008::15). - connect (101: Network is unreachable) Could not connect to ppa.launchpad.net:80 (91.189.95.83), connection timed out
Err:7 http://ppa.launchpad.net/vikoadi/ppa/ubuntu bionic InRelease
Cannot initiate the connection to ppa.launchpad.net:80 (2001:67c:1560:8008::15). - connect (101: Network is unreachable)
Err:8 http://packages.microsoft.com/repos/vscode stable InRelease
Connection failed [IP: 104.214.230.139 80]
Err:9 http://archive.canonical.com/ubuntu bionic InRelease
Connection failed [IP: 91.189.91.15 80]
Reading package lists... Done
W: Failed to fetch http://ny-mirrors.evowise.com/ubuntu/dists/bionic/InRelease Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:4b3). - connect (101: Network is unreachable) Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:5b3). - connect (101: Network is unreachable) Could not connect to ny-mirrors.evowise.com:80 (104.22.5.179), connection timed out Could not connect to ny-mirrors.evowise.com:80 (104.22.4.179), connection timed out
W: Failed to fetch http://ny-mirrors.evowise.com/ubuntu/dists/bionic-updates/InRelease Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:4b3). - connect (101: Network is unreachable) Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:5b3). - connect (101: Network is unreachable)
W: Failed to fetch http://ny-mirrors.evowise.com/ubuntu/dists/bionic-backports/InRelease Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:4b3). - connect (101: Network is unreachable) Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:5b3). - connect (101: Network is unreachable)
W: Failed to fetch http://archive.canonical.com/ubuntu/dists/bionic/InRelease Connection failed [IP: 91.189.91.15 80]
W: Failed to fetch http://ny-mirrors.evowise.com/ubuntu/dists/bionic-security/InRelease Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:4b3). - connect (101: Network is unreachable) Cannot initiate the connection to ny-mirrors.evowise.com:80 (2606:4700:10::6816:5b3). - connect (101: Network is unreachable)
W: Failed to fetch http://ppa.launchpad.net/samoilov-lex/aftl-stable/ubuntu/dists/artful/InRelease Cannot initiate the connection to ppa.launchpad.net:80 (2001:67c:1560:8008::15). - connect (101: Network is unreachable) Could not connect to ppa.launchpad.net:80 (91.189.95.83), connection timed out
W: Failed to fetch http://repo.mysql.com/apt/ubuntu/dists/bionic/InRelease Could not connect to repo.mysql.com:80 (23.213.169.17), connection timed out
W: Failed to fetch http://ppa.launchpad.net/vikoadi/ppa/ubuntu/dists/bionic/InRelease Cannot initiate the connection to ppa.launchpad.net:80 (2001:67c:1560:8008::15). - connect (101: Network is unreachable)
W: Failed to fetch http://packages.microsoft.com/repos/vscode/dists/stable/InRelease Connection failed [IP: 104.214.230.139 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
我尝试了一些解决方案,但没有任何帮助。
试试这个:
sudo su # login as root
cd /var/lib/apt/lists/
rm -fr *
cd /etc/apt/sources.list.d/
rm -fr *
cd /etc/apt
cp sources.list sources.list.old
cp sources.list sources.list.tmp
sed 's/ubuntuarchive.hnsdc.com/us.archive.ubuntu.com/' sources.list.tmp | tee sources.list
rm sources.list.tmp*
apt-get clean
apt update