如何解决 /etc/apt/sources.list 中忽略的文件以及更新 APT 缓存时未找到文件的错误?

如何解决 /etc/apt/sources.list 中忽略的文件以及更新 APT 缓存时未找到文件的错误?

我正在尝试运行sudo apt-get update,但遇到了这类错误。

N: Ignoring file 'libjpeg8_8c-2ubuntu8_amd64.deb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'libdouble-conversion1_3.1.0-3_amd64.deb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'libjpeg-turbo8_2.0.3-0ubuntu1_amd64.deb' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
E: The repository 'http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu focal 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

您可以删除/etc/apt/sources.list.d目录中的这些 deb 文件。打开终端并运行以下命令:

sudo rm /etc/apt/sources.list.d/*.deb

相关内容