红联Linux门户
Linux帮助

Failed to fetch cdrom问题的解决办法

发布时间:2016-03-14 15:22:24来源:linux网站作者:ckk2019

问题描述:

Ubuntu中,使用sudo apt-get update更新,会出现如下错误:

W: Failed to fetch cdrom://Ubuntu-Server 15.10 _Wily Werewolf_ - Release amd64 (20151021)/dists/wily/main/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu-Server 15.10 _Wily Werewolf_ - Release amd64 (20151021)/dists/wily/restricted/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu-Server 15.10 _Wily Werewolf_ - Release amd64 (20151021)/dists/wily/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu-Server 15.10 _Wily Werewolf_ - Release amd64 (20151021)/dists/wily/restricted/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

E: Some index files failed to download. They have been ignored, or old ones used instead.


问题原因:

开启了cdrom源,系统会加载cdrom源进行更新


解决方案:

进入/etc/apt/sources.list目录,备份sources.list文件,修改sources.list文件
cd /etc/apt/
cp sources.list sources.list.origin
vim sources.list

# 注释如下内容
# deb cdrom:[Ubuntu-Server 15.10 _Wily Werewolf_ - Release amd64 (20151021)]/ wily main restricted


本文永久更新地址:http://www.linuxdiyf.com/linux/18924.html