[SOLVED] Not able to update, "unable to lock database"

When I try to update through manjaro XFCE terminal I get this error:
[ghost@ghost-pc ~]$ sudo pacman -Syyu
[sudo] password for ghost:
:: 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 any databases
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
[ghost@ghost-pc ~]$

Not sure why this is happening. Only other thing is that pamac shows 195 updates. Not sure if that is conflicting

Do you have ‘automatically check for updates’ enabled in Pamac?
It’s possible Pamac was right in the middle of checking for updates (and therefore created the lock file) when you ran pacman.

1 Like

Yes I have that checked already

I would say try again, it’s been 20 minutes. If it’s running in the background, it should be done now and you can do the update. If it’s still locked, I’d try rebooting then check if the file /var/lib/pacman/db.lck exists, if it still exists, I guess delete it and try again.

It was a glitch. A simple restart cured it. Thx for your input

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by Bytemark