我使用的是kali linux 4.13.0 amd64。
运行 apt update 时出现问题并显示错误。
# sudo apt update
Ign:1 cdrom://[Debian GNU/Linux 2017.3 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20171109-13:49] kali-rolling InRelease
Err:2 cdrom://[Debian GNU/Linux 2017.3 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20171109-13:49] kali-rolling Release
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Reading package lists... Done
E: The repository 'cdrom://[Debian GNU/Linux 2017.3 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20171109-13:49] kali-rolling 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.*
答案1
答案2
从您的 中删除/取消注释以下行/etc/apt/sources.list
:
cdrom://[Debian GNU/Linux 2017.3 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20171109-13:49] kali-rolling InRelease
因为你的sources.list
应仅包含以下行:
deb http://http.kali.org/kali kali-rolling main contrib non-free
您可以使用以下命令覆盖您的sources.list
:
echo deb http://http.kali.org/kali kali-rolling main contrib non-free > /etc/apt/sources.list
apt update
答案3
德布http://http.kali.org/kalikali-rolling main contrib non-free
上述条目将从互联网进行 apt 更新,而不是从 cdrom 错误的解决方案。