更改镜像源的方法
1、备份 /etc/apt/sources.list 文件,另起名为source.list.old
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
2 打开文件
sudo gedit /etc/apt/sources.list
将这个打开的文件里全部删掉,然后换成下面的新的源,不要害怕,你备份了的.
3 在你打开的sources.list 文件下(此时应该是空白的),将下面阿里源(有的人说清华源不全,我只是用的阿里源)的内容复制进去
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src 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-backports main restricted universe multiverse
4 .
sudo apt-get update
这个时候在尝试一下安装你没有成功安装的包.