6

I am a noob on an i5 desktop. I could not update my system. Terminal reads as follows, after I type and enter "sudo pacman -Syu"

[sudo] password for user-name: ********
:: 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

Help!!

Thế Huynh Phạm
  • 551
  • 1
  • 4
  • 12

4 Answers4

11

I'm sorry, this is already covered in the wiki...

sudo rm /var/lib/pacman/db.lck

pacman-ArchWiki: "Failed to init transaction (unable to lock database)" error

Thế Huynh Phạm
  • 551
  • 1
  • 4
  • 12
2

If you've already deleted /var/lib/pacman/db.lck, like OP posted, and still got the same problem, try this:

sudo rm /var/tmp/pamac/dbs/db.lck
his dudeness
  • 316
  • 3
  • 14
0

This can be solved by quitting Software Update program from task manager. This worked for me.

0

Hit this issue a few times on Manjaro and the answer was never to delete the database lock

  1. sudo rm -r /var/tmp/pamac to delete the temp package manager directory
  2. sudo pacman -Syu to synchronize the repository databases and update system packages
  3. Quit out of the package manager app/GUI and reload. All should be back to normal.
Wolf
  • 567
  • 7
  • 10