I have seen lately a relative big number of users (here and in the spanish-speaking Telegram forum) with the same problem. Graphical pamac can’t update because “Unable to lock database”. The solution seems to be always the same, run the command: pamac update --force-refresh
I’m not sure what’s the difference with this command, as the graphical tools seems to be trying to do just that, update the database. I haven’t had this problem myself, but I am curious to know what could be the cause to this. Does anyone know? Is it a bug somehow? Or is it something users are doing wrong? (although I doubt it)
There may be some correlation between having run pamac with sudo or perhaps it appears when you have opened settings then downloading databases which creates the database problem due to the folder having the wrong permissions.
I think the issue had been solved - I recall a topic recently where @Yochanan posted something about this - but I don’t recall specifically.
Yes, I know. Just yesterday I helped an user that had the pamac_aur.db problem. But the error message was exactly that: “Cannot create regular file …”. In that case it was his fault and the /var/tmp/pamac folder and subfolders had the wrong owner.
But the problem we are seeing most is the one with the error message “Unable to lock database”.
Anyway, I’m going to ask the next user with that problem to show his pamac database folder. Let’s see if I can spot something odd there.
The GUI should only be used to see what updates you have. You will have less problems doing the updates through your terminal. I have seen AUR packages not built through pamac, but the same package build and install without issue doing it via the terminal. Wine-Staging is another one that sometimes doesn’t like to offer all the 32 bit components needed, but not a issue in terminal.