我刚刚完成了 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.
我真的不明白这里有什么问题,如果这些是我在文件中干净安装附带的默认源,我什么也没做。
评论您的
deb cdrom:
行并评论/删除这些行并将它们替换为
我不知道这些存储库是否已更改,但这些是从Debian wiki获取的(工作)存储库。
或从 wiki 复制并粘贴示例 source.list,这是带有附加
contrib
和non-free
repos的示例并
sudo apt update
再次运行。我在将Debian 9 Stretch 升级到 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”)sudo gedit /etc/apt/sources.list
,找到重复的行并将其注释掉#
sudo apt update
去应该不错。这个Linux Mint 论坛帮助我找到了答案,也可能对你有所帮助。
类似的错误,i386,Debian-10-server,没有桌面环境。我在另一台具有桌面环境的机器上进行了类似的安装,没有问题。我只是编辑了 /etc/apt/sources.list 以匹配工作系统。