root@xxx:/opt# apt install unzip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package unzip
出现上面问题,执行下面命令后就可以
root@xxx:~# sudo apt-get update
sudo: unable to resolve host iZ2zeavqe88suzfdrbj5q6Z
Hit:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial InRelease
Hit:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates InRelease
Hit:3 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security InRelease
Reading package lists... Done
update 是同步 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的索引,这样才能获取到最新的软件包。