文章目录
一、每台机器都要修改3个文件:
1.复制.1的/etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
2.复制.1的/etc/resolv.conf
# Generated by NetworkManager
nameserver 10.1.4.210
3.etc/hosts 添加 112.15.7.51 mirrors.aliyun.com
/etc/hosts最后一行添加:
112.15.7.51 mirrors.aliyun.com
即:
127.0.0.1 localhost
127.0.1.1 ubuntu
112.15.7.51 mirrors.aliyun.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1 hza-peg-blt-01
改为
127.0.0.1 localhost
127.0.1.1 ubuntu
112.15.7.51 mirrors.aliyun.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1 hza-peg-blt-01
112.15.7.51 mirrors.aliyun.com
二、现在安装所需软件
sudo apt update
sudo apt --fix-broken install (修复破损的依赖关系)
sudo apt install ansible
sudo apt install sshpass
sudo apt install fbterm
1万+

被折叠的 条评论
为什么被折叠?



