Also, I Set it to Main server in software & updates but this happens:
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 12878 (apt)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/lib/apt/lists/
In sudo apt upgrade -y:
Disable the brave-repository by renaming the file "brave-browser-release.list" to "brave-browser-release.list.bak" at /etc/apt/sources.list.d or by adding a # at the beginning of that textfile so that it begins with #deb [signed-by...
You need root rights to do this, so open your filemanager, press ctrl+L and then remove everything in the path field at the top and enter
admin://
there. Then go to etc > apt> souces.list.d
and edit the file brave-browser-release.list or rename it.
Afterwards run
sudo apt update
When you have opened multiple programs which use the package manager, then you get that error "could not get lock" -message. So please close the update-manager, gnome software center or software & updates before you open another app.
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 12878 (apt)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/lib/apt/lists/
Yes, that is right.
Are all other apps closed when you run the sudo apt update command in terminal? If it still shows the message and you have closed the other apps, then there may be updates in the background. Then wait 5 minutes and try it again.
Yes
But this happen's:
E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1126 (packagekitd)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to lock directory /var/lib/apt/lists/
I changed the title to something more accurate, though less sensational.
The error notes it is a Temporary Unavailability of the server- so it may be that the server itself has an outage.
It seems to have Issues with the Repos for Firefox and Google Chrome.
If I remember right Google Chrome adds the Repo when You install the Browser with the .deb File. For this, I would suggest to uninstall Google Chrome and then install it with the .deb File again. Download the .deb File before uninstall.
For Firefox, there are Instructions to add the Repo manually. I would suggest to go through this Procedure:
Another Option would be that because of the current ... Situation between Iran and the USA one or both Countries block Access.