sudo pacman -Syyu 1 ✘
:: Synchronizing package databases…
error: failed to update core (unable to lock database)
error: failed to update extra (unable to lock database)
error: failed to update community (unable to lock database)
error: failed to update multilib (unable to lock database)
error: failed to synchronize all databases
the answer is in the last 2 lines that you truncate
“remove file …”
I didn’t cut anything, this is all my output. What file I should delete ?
Why I should delete anything. Normally I just sudo pacman -Syyu all gone well
with new pacman 6 we not have message ???
https://wiki.manjaro.org/index.php?title=Pacman_troubleshooting#.22Unable_to_lock_database.22_Error
Apparently not, just tested it:
~ # touch /var/lib/pacman/db.lck
~ # pacman -Syu
:: Synchronizing package databases...
error: failed to synchronize all databases (unable to lock database)
~ # rm /var/lib/pacman/db.lck
not since pacman 6 ? https://forum.manjaro.org/t/cant-updating-using-syyu/57459 https://www.debugpoint.com/2020/12/pacman-failed-to-update-core-fix/
no, is not a dream… this message existed
https://ostechnix.com/how-to-fix-unable-to-lock-database-error-in-arch-linux/
sorry @kalin
Still a little off topic:
Looks like an oversight or bug. Another command shows the message (note the missing sync -y
):
# pacman -Su
error: failed to init transaction (unable to lock database)
error: could not lock database: File exists
if you're sure a package manager is not already
running, you can remove /var/lib/pacman/db.lck
edit:
See the error handling when initializing a transaction fails (explicit check for db lockfile and printing the message):
vs when sync fails (just cleanup):
and
error: failed to commit transaction (conflicting files)
gnome-shell-extension-dash-to-dock: /usr/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas/gschemas.compiled exists in filesystem
Errors occurred, no packages were upgraded.
Do I need to delete this file too ?
yes, or overwrite it:
$ sudo pacman -Syu --overwrite '/usr/share/gnome-shell/extensions/*'