Unable to locate package ***

遇到这个问题直接尝试sudo apt-get update 和 sudo apt-get upgrade 一般可以解决,

但是执行之后出现源的问题,访问ubuntu 官方源link  time out.

Cannot initiate the connection to cn.archive.ubuntu.com:80 (2001:67c:1562::18)

1、划重点: 直接换源

注释掉Ubuntu 官方deb 链接,添加国内源链接

sudo vim /etc/apt/sources.list

添加国内原链接:阿里源或者其他国内源

阿里源:

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

2、重新update 和 upgrade,且重新安装

sudo apt-get update

sudo apt-get upgrade