Debian 12 CD-ROM 源修改为网络源
一台机器安装Debian时选择了CD-ROM作为更新源,apt-get 时提示如下错误:
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
一、编辑文件
1
vim /etc/apt/sources.list
二、加#注释掉CDROM 那行源
1
cdrom://[Debian GNU/Linux 12.1.0 Bookworm - Official amd64 DVD
三、添加官方源
1
2
3
deb http://deb.debian.org/debian/ bookworm main contrib non-free
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free
deb http://security.debian.org/debian-security bookworm-security main contrib non-free
四、更新即可
1
2
3
apt-get update
apt-get dist-upgrade
apt-get upgrade
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。