新安装的Debian系统,经常出现安装不了软件的情况,因为默认的源是国外,所以导致无法安装,我们可以通过修改源的方式进行处理。

1.编辑 /etc/apt/sources.list 文件以修改更新源

vim /etc/apt/sources.list

2.写入如下内容

deb http://mirrors.163.com/debian/  stretch main non-free contrib

deb http://mirrors.163.com/debian/  stretch-updates main non-free contrib

deb http://mirrors.163.com/debian/  stretch-backports main non-free contrib

deb-src http://mirrors.163.com/debian/  stretch main non-free contrib

deb-src http://mirrors.163.com/debian/  stretch-updates main non-free contrib

deb-src http://mirrors.163.com/debian/  stretch-backports main non-free contrib

deb http://mirrors.163.com/debian-security/  stretch/updates main non-free contrib

deb-src http://mirrors.163.com/debian-security/  stretch/updates main non-free contrib

3.保存并获取软件包列表

apt-get update