提示错误如下
Ign:1 http://repo.huaweicloud.com/ubuntu jammy InRelease
Ign:2 http://repo.huaweicloud.com/ubuntu jammy-updates InRelease
Ign:1 http://repo.huaweicloud.com/ubuntu jammy InRelease
Ign:2 http://repo.huaweicloud.com/ubuntu jammy-updates InRelease
Ign:1 http://repo.huaweicloud.com/ubuntu jammy InRelease
Ign:2 http://repo.huaweicloud.com/ubuntu jammy-updates InRelease
Err:1 http://repo.huaweicloud.com/ubuntu jammy InRelease
Could not connect to repo.huaweicloud.com:80 (175.153.171.176), connection timed out Could not connect to repo.huaweicloud.com:80 (175.153.171.174), connection timed out Could not connect to repo.huaweicloud.com:80 (175.153.171.177), connection timed out Could not connect to repo.huaweicloud.com:80 (175.153.171.173), connection timed out Could not connect to repo.huaweicloud.com:80 (175.153.171.171), connection timed out Could not connect to repo.huaweicloud.com:80 (175.153.171.175), connection timed out Could not connect to repo.huaweicloud.com:80 (175.153.171.172), connection timed out
Err:2 http://repo.huaweicloud.com/ubuntu jammy-updates InRelease
Unable to connect to repo.huaweicloud.com:http:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://repo.huaweicloud.com/ubuntu/dists/jammy/InRelease Could not connect to repo.huaweicloud.com:80 (175.153.171.176), connection timed out Could not connect to repo.huaweicloud.com:80 (175.153.171.174), connection timed out Could not connect to repo.huaweicloud.com:80 (175.153.171.177), connection timed out Could not connect to repo.huaweicloud.com:80 (175.153.171.173), connection timed out Could not connect to repo.huaweicloud.com:80 (175.153.171.171), connection timed out Could not connect to repo.huaweicloud.com:80 (175.153.171.175), connection timed out Could not connect to repo.huaweicloud.com:80 (175.153.171.172), connection timed out
W: Failed to fetch http://repo.huaweicloud.com/ubuntu/dists/jammy-updates/InRelease Unable to connect to repo.huaweicloud.com:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.
能ping通镜像源,且镜像源无问题,已修改dns
其实微软官方文档已经说了,见下图
关闭防火墙即可