错误描述
今天在执行sudo apt-get update时,出现了以下错误:
Err:10 https://packages.cloud.google.com/apt cloud-sdk InRelease
Could not connect to packages.cloud.google.com:443 (172.217.163.46), connection timed out
Fetched 4,439 B in 33s (134 B/s)
Reading package lists... Done
W: Failed to fetch https://packages.cloud.google.com/apt/dists/cloud-sdk/InRelease Could not connect to packages.cloud.google.com:443 (172.217.163.46), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.
看起来是因为链接不上google.com,四处寻找镜像无果。参考以下链接后,打算放弃这个东西的安装。
kubectl安装无法连接packages.cloud.google.com_Rory602的博客-优快云博客
解决方案
cd /etc/apt/sources.list.d
sudo vim google-cloud-sdk.list
将其中的那句话注释掉
# deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main
再次执行sudo apt-get update之后,错误解决。