报错信息:
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