Apt

4.13.0-kali-amd64 中的 apt update 錯誤:“請使用 apt-cdrom 使此 CD-ROM 被 APT 辨識”

  • January 26, 2022

我在 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.*

從您的以下行中刪除/取消註釋/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

您的更新儲存庫是 cdrom。

這裡看看如何更新你的儲存庫。

(也許檢查您的網際網路連接)

引用自:https://unix.stackexchange.com/questions/413237