Debian系统 CD/DVD 源更新问题解决方案
黑五从 Colocrossing 买了一台独立服务器,拿到手准备先看一下配置情况,结果没有安装curl。
安装curl提示系统升级。
apt update 系统升级提示错误:
Ign:1 cdrom://[Debian GNU/Linux 13.0.0 _Trixie_ - Official amd64 DVD Binary-1 with firmware 20250809-11:21] trixie InRelease
Err:2 cdrom://[Debian GNU/Linux 13.0.0 _Trixie_ - Official amd64 DVD Binary-1 with firmware 20250809-11:21] trixie 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://security.debian.org/debian-security trixie-security InRelease
Hit:4 http://deb.debian.org/debian trixie InRelease
Hit:5 http://deb.debian.org/debian trixie-updates InRelease
Error: The repository 'cdrom://[Debian GNU/Linux 13.0.0 _Trixie_ - Official amd64 DVD Binary-1 with firmware 20250809-11:21] trixie Release' does not have a Release file.
Notice: Updating from such a repository can't be done securely, and is therefore disabled by default.
Notice: See apt-secure(8) manpage for repository creation and user configuration details.
于是找来Deepseek,一行命令搞定:
# 或者使用 sed 注释掉所有 cdrom 行
sed -i 's/^deb cdrom/# deb cdrom/' /etc/apt/sources.list
评论已关闭