ubuntu 22.04 apt-get 安装软件报错:Temporary failure resolving ‘cn.archive.ubuntu.com‘

avatar
作者
筋斗云
阅读量:1

报错信息:

在这里插入图片描述

Err:1 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 libtcl8.6 amd64 8.6.12+dfsg-1build1
Temporary failure resolving ‘cn.archive.ubuntu.com’
Err:2 http://cn.archive.ubuntu.com/ubuntu jammy/main amd64 tcl8.6 amd64 8.6.12+dfsg-1build1
Temporary failure resolving ‘cn.archive.ubuntu.com’
Err:3 http://cn.archive.ubuntu.com/ubuntu jammy/universe amd64 tcl-expect amd64 5.45.4-2build1
Temporary failure resolving ‘cn.archive.ubuntu.com’
Err:4 http://cn.archive.ubuntu.com/ubuntu jammy/universe amd64 expect amd64 5.45.4-2build1
Temporary failure resolving ‘cn.archive.ubuntu.com’
E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/main/t/tcl8.6/libtcl8.6_8.6.12%2bdfsg-1build1_amd64.deb Temporary failure resolving ‘cn.archive.ubuntu.com’
E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/main/t/tcl8.6/tcl8.6_8.6.12%2bdfsg-1build1_amd64.deb Temporary failure resolving ‘cn.archive.ubuntu.com’
E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/universe/e/expect/tcl-expect_5.45.4-2build1_amd64.deb Temporary failure resolving ‘cn.archive.ubuntu.com’
E: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/universe/e/expect/expect_5.45.4-2build1_amd64.deb Temporary failure resolving ‘cn.archive.ubuntu.com’
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

解决方法:

启动自带的dns服务:
systemctl enable systemd-resolved.service --now
在这里插入图片描述

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!