每次我执行sudo apt-get update
以下操作时都会出现此错误
Hit:1 http://archive.canonical.com yakkety InRelease
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://security.ubuntu.com/ubuntu yakkety-security InRelease
Hit:4 http://dl.google.com/linux/chrome/deb stable Release
Hit:6 http://ppa.launchpad.net/git-core/ppa/ubuntu yakkety InRelease
Hit:7 http://ppa.launchpad.net/webupd8team/java/ubuntu yakkety InRelease
Err:8 http://ph.archive.ubuntu.com/ubuntu yakkety InRelease
Could not connect to ph.archive.ubuntu.com:80 (202.90.159.172), connection timed out
Err:9 http://ph.archive.ubuntu.com/ubuntu yakkety-updates InRelease
Unable to connect to ph.archive.ubuntu.com:http:
Err:10 http://ph.archive.ubuntu.com/ubuntu yakkety-backports InRelease
Unable to connect to ph.archive.ubuntu.com:http:
Reading package lists... Done
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/yakkety/InRelease Could not connect to ph.archive.ubuntu.com:80 (202.90.159.172), connection timed out
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/yakkety-updates/InRelease Unable to connect to ph.archive.ubuntu.com:http:
W: Failed to fetch http://ph.archive.ubuntu.com/ubuntu/dists/yakkety-backports/InRelease Unable to connect to ph.archive.ubuntu.com:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.
我正在 Ubuntu 16.10 LTS 上运行,昨天还可以运行。
答案1
错误很明显,您无法连接到 URL ph.archive.ubuntu.com
,因此请转到/etc/apt/
并搜索ph.archive.ubuntu.com
并通过评论或删除禁用它
cd /etc/apt/
sudo grep -ir 'ph.archive.ubuntu.com' ./
然后打开包含它的文件并禁用它。