从DVD安装Debian 10后,我的系统无法更新或安装任何软件包,因为sources.list将DVD安装存储称为软件包存储库,我不得不手动更新sources.list文件,其中包含可以从中下载程序包的URL和安全更新位置的正确URL列表。在本文中,我们介绍将官方Debian 10 apt存储库添加到sources.list文件中的方法。要了解该系统版本新功能,请参考:Debian 10 Buster的主要新功能/新特性介绍。
旧文件 运行:$ cat /etc/apt/sources.list # deb cdrom:[Debian GNU/Linux testing _Buster_ - Official Snapshot amd64 DVD Binary-1 20190527-04:04]/ buster contrib main deb cdrom:[Debian GNU/Linux testing _Buster_ - Official Snapshot amd64 DVD Binary-1 20190527-04:04]/ buster contrib main deb http://security.debian.org/debian-security buster/updates main contrib deb-src http://security.debian.org/debian-security buster/updates main contrib
将Debian 10 Buster官方存储库添加到sources.list的方法 将/etc/apt/sources.list文件更新为如下所示,即用以下文件内容替代原来旧文件内容: deb http://deb.debian.org/debian buster main contrib non-free deb-src http://deb.debian.org/debian buster main contrib non-free deb http://security.debian.org/debian-security buster/updates main contrib deb-src http://security.debian.org/debian-security buster/updates main contrib /etc/apt/sources.list新文件见下面的截图:
完成后,更新你的APT索引,运行sudo apt update命令,如下: $ sudo apt update Hit:1 http://security.debian.org/debian-security buster/updates InRelease Hit:2 http://deb.debian.org/debian buster InRelease Reading package lists... Done Building dependency tree Reading state information... Done 63 packages can be upgraded. Run 'apt list --upgradable' to see them. 升级你的系统包: sudo apt upgrade -y 尝试安装其他软件包,例如: sudo apt install bash-completion wget curl vim telnet -y 至此,sources.list包含的是Debian 10 Buster官方存储库。
相关主题 |