我刚刚完成 Debian buster 的全新安装,但在使用 APT 时遇到了问题。
我跑了sudo apt update
,我得到了这个
Ign:1 cdrom://[Debian GNU/Linux 10.1.0 _Buster_ - Official amd64 NETINST 20190908-01:07] buster InRelease
Err:2 cdrom://[Debian GNU/Linux 10.1.0 _Buster_ - Official amd64 NETINST 20190908-01:07] buster Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Hit:3 http://deb.debian.org/debian buster InRelease
Ign:4 http://deb.debian.org/debian buster/updates InRelease
Hit:5 http://deb.debian.org/debian buster-updates InRelease
Err:6 http://deb.debian.org/debian buster/updates Release
404 Not Found [IP: 151.101.132.204 80]
Reading package lists... Done
E: The repository 'cdrom://[Debian GNU/Linux 10.1.0 _Buster_ - Official amd64 NETINST 20190908-01:07] buster Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://deb.debian.org/debian buster/updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:4
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:4
W: Target Translations (main/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:4
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:4
W: Target DEP-11 (main/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:4
W: Target DEP-11 (main/dep11/Components-all.yml) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:4
W: Target DEP-11-icons-small (main/dep11/icons-48x48.tar) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:4
W: Target DEP-11-icons (main/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:4
这里有我的sources.list的内容
#
deb cdrom:[Debian GNU/Linux 10.1.0 _Buster_ - Official amd64 NETINST 20190908-01:07]/ buster main
deb cdrom:[Debian GNU/Linux 10.1.0 _Buster_ - Official amd64 NETINST 20190908-01:07]/ buster main
deb http://deb.debian.org/debian/ buster main
deb-src http://deb.debian.org/debian/ buster main
deb http://deb.debian.org/debian/ buster/updates main
deb-src http://deb.debian.org/debian/ buster/updates main
# buster-updates, previously known as 'volatile'
deb http://deb.debian.org/debian/ buster-updates main
deb-src http://deb.debian.org/debian/ buster-updates main
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
我真的不明白这里有什么问题,如果这些是我在文件内进行全新安装时附带的默认源,那么我什么也没做。
答案1
注释您的deb cdrom:
行并注释/删除行
deb http://deb.debian.org/debian/ buster/updates main
deb-src http://deb.debian.org/debian/ buster/updates main
并将它们替换为
deb http://deb.debian.org/debian-security/ buster/updates main
deb-src http://deb.debian.org/debian-security/ buster/updates main
我不知道这些存储库是否已更改,但这些是从Debian 维基。
或者复制并粘贴示例源.list来自 wiki,这是带有附加contrib
和non-free
存储库的一个
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://deb.debian.org/debian-security/ buster/updates main contrib non-free
deb-src http://deb.debian.org/debian-security/ buster/updates main contrib non-free
deb http://deb.debian.org/debian buster-updates main contrib non-free
deb-src http://deb.debian.org/debian buster-updates main contrib non-free
并再次运行sudo apt update
。
答案2
我升级时遇到这个问题Debian 9 延伸至 Debian 10 Buster,我的问题是向后移植重复错误:
解决方法:
- 找到重复的行
cat /etc/apt/sources.list.d/cat /etc/apt/sources.list.d/buster-backports.list
(用“YOUR-DOUBLY-CONFIGURED-FILENAME”替换“buster-backports.list”) - 使用 打开sources.list
sudo gedit /etc/apt/sources.list
,找到重复的行并将其注释掉#
- 保存文件并更新系统
sudo apt update
应该很好走。这Linux Mint 论坛帮助我找到了答案,也可能对你有帮助。
答案3
类似的错误,i386,Debian-10-server,没有桌面环境。我在另一台具有桌面环境的计算机上进行了类似的安装,没有出现问题。我只是编辑了 /etc/apt/sources.list 以匹配工作系统。
root@svr2:/etc/apt# cat sources.list
#
# deb cdrom:[Debian GNU/Linux 10.5.0 _Buster_ - Official i386 NETINST 20200801-13:11]/ buster main
#deb cdrom:[Debian GNU/Linux 10.5.0 _Buster_ - Official i386 NETINST 20200801-13:11]/ buster main
deb http://mirror.cc.columbia.edu/debian/ buster main
deb-src http://mirror.cc.columbia.edu/debian/ buster main
deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main
# buster-updates, previously known as 'volatile'
deb http://mirror.cc.columbia.edu/debian/ buster-updates main
deb-src http://mirror.cc.columbia.edu/debian/ buster-updates main
root@svr2:/etc/apt# apt-get update
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Hit:2 http://mirror.cc.columbia.edu/debian buster InRelease
Get:3 http://mirror.cc.columbia.edu/debian buster-updates InRelease [51.9 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main Sources [152 kB]
Fetched 269 kB in 2s (177 kB/s)
Reading package lists... Done