6

When running the command sudo apt update I get the following problems that bothers me a lot:

$ 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.

When trying to use sudo apt autoremove I get the following result:

$ 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?
Zanna
  • 70,465
  • I concur with HappyTux regarding the state of the sources list. As for the dpkg lock, could you update your question to include the output of ps aux | grep -i apt? The solution may be just a couple of clicks. –  Feb 21 '21 at 01:19
  • 1
    It doesn't appear that you're using Ubuntu? – KGIII Feb 21 '21 at 02:21
  • What's the OS? Hirsuite is in beta (so we don't fully support it here). Mixing repositories from different distros and even versions causes issues like this. I suggest you [edit] and post the contents of your /etc/apt/sources.list and output of lsb_release -a. – Zanna Feb 21 '21 at 08:10
  • I'm using chrome os. Which has ubuntu in only one window if I'm not mistaken. – Saulo Felipe Feb 21 '21 at 14:59
  • For me, I was getting that error because I was using an unsupported Ubuntu version at that moment. ubuntu 22 worked but Ubuntu 23 did not work – Charden Daxicen Nov 08 '23 at 12:04

1 Answers1

5

You need to edit your /etc/apt/sources.list and remove all the useless repositories you have in it. You have lines for two different and incompatible Ubuntu releases, Debian buster which is incompatible with both of those and the third party repositories who knows if compatible, I am not going to check. The file is a mess and will never produce a stable system. The third party sources can be in your /etc/apt/sources.d/ directory the location for them third party installed sources. Comment out the lines in those files by putting a # at the start of the lines that do not have one or removing the file completely, then apt update to have it re-read and update the package cache.

  • When opening sources.list, I have only the files: deb https://deb.debian.org/debian buster main deb https://deb.debian.org/debian-security buster/updates main – Saulo Felipe Feb 21 '21 at 14:56
  • Then they are in your /etc/apt/sources.d/ directory the location for third party installed sources. Comment out the lines in those files by putting a # at the start of the lines that do not have one or removing the file completely, the apt update. You want at least the Ubuntu removed as it appears you are supposed to be running Buster from that response. I have edited the response to reflect the third party location. –  Feb 21 '21 at 15:04
  • Thanks for the help, I was able to remove the files that were causing the problem, they were exactly in /etc/apt/sources.list.d. Everything is going normally now. – Saulo Felipe Feb 21 '21 at 15:11
  • Good to read it is solved, in the future only put in lines that are confirmed to be compatible with Buster, this will allow the software to be used with your system. –  Feb 21 '21 at 15:14
  • What do you mean by "useless repositories"? Which ones are useless? How can we tell that they are useless? – nicbou Jul 12 '23 at 22:08