sudo apt-get update 错误消息 16.04

sudo apt-get update 错误消息 16.04

我正在运行sudo apt-get update更新 Ubuntu 16.04.2 64 位上的新安装。我收到以下错误消息:

The repository 'cdrom://Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2) xenial Release' does not have a Release file.  
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.  
N: See apt-secure(8) manpage for repository creation and user configuration details.  
E: Failed to fetch cdrom://Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)/dists/xenial/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  
E: Some index files failed to download. They have been ignored, or old ones used instead.

我尝试使用 apt-cdrom 命令来挂载 cdrom,但是它似乎不起作用,我想我输入错了,因为我是 Linux 新手,只使用了几个星期。我尝试输入命令,但返回结果为无法找到命令。apt-cdrom 提供了关于如何解决这个问题的很好的信息,但是我不确定如何使用它或如何正确输入命令。

答案1

您是否已装入安装程序 CD?看来您/etc/apt/sources.list可能认为您已装入,因此才会出现令人恼火的错误。

该命令cat /etc/apt/sources.list向您显示了什么?特别是,以 开头的行是否被deb cdrom注释掉(在其前面有一个 #)?如果没有,则应该是(假设您没有装入 CD)。

请记住,对 的任何更改都/etc/apt/sources.list需要刷新(sudo apt-get update)。

有关管理 Ubuntu 存储库的更多详细信息请参见此处:https://help.ubuntu.com/community/Repositories/CommandLine

相关内容