使用‘sudo apt update’时出现 404 错误和“存储库没有发布文件”

使用‘sudo apt update’时出现 404 错误和“存储库没有发布文件”

运行该命令时,sudo apt update我遇到了以下令我非常困扰的问题:

$ sudo apt update

Hit:1 http://repo.mysql.com/apt/ubuntu eoan InRelease    
Hit:2 https://deb.debian.org/debian buster InRelease               
Ign:3 http://ppa.launchpad.net/morphis/anbox-support/ubuntu hirsute InRelease
Hit:4 https://deb.debian.org/debian-security buster/updates InRelease
Hit:5 https://download.sublimetext.com apt/stable/ InRelease       
Ign:6 https://storage.googleapis.com/cros-packages/88 buster InRelease
Err:7 http://ppa.launchpad.net/morphis/anbox-support/ubuntu hirsute Release
  404  Not Found [IP: 91.189.95.85 80]
Hit:8 https://storage.googleapis.com/cros-packages/88 buster Release
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/morphis/anbox-support/ubuntu hirsute 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.

当我尝试使用时,sudo apt autoremove我得到以下结果:

$ sudo apt autoremove
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

答案1

您需要编辑您的/etc/apt/sources.list并删除其中所有无用的存储库。您有两个不同且不兼容的 Ubuntu 版本的行,Debian buster 与这两个版本都不兼容,第三方存储库不知道是否兼容,我不会检查。该文件一团糟,永远不会产生稳定的系统。第三方源可以在您的/etc/apt/sources.d/目录中,即第三方安装源的位置。通过在没有行的行开头添加注释掉这些文件中的行#或完全删除文件,然后apt update让它重新读取并更新包缓存。

相关内容