Several software packages cannot be downloaded, why not run apt-get update or add –fix-missing option and try again?
I solve it in the following way:
First:
sudo apt-get update
Still not working, change the source and back up a source file first
sudo cp /etc/apt/sources.list /etc/apt/sources-bak.list
Then
sudo gedit /etc/apt/sources.list
Replace all the content (Note: This source is 16.04, other versions can be found on the mirror website)
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
Then save it.
My version is ubuntu 16.04. For other versions of ubuntu, please refer to the website to change the source ubuntu | mirror station use help | Tsinghua University open source software mirror station | Tsinghua Open Source Mirror
sudo apt-get update
You can sudo apt-get install xxx.