• warning: lock file missing /var/lib/pacman/db.lck


    Hello,

    I was wondering what could cause the above message and what I can do to fix it. It occurs intermittently when running “pacman -Syu” at the commandline. I’m not sure if there’s a relationship with this and running pamac just before opening a terminal.

    I’ve only seen this message since recently installing Antergos, I never saw it with “Vanilla Arch” but then I never used pamac before either, and am I wondering if this is a true pacman problem or something that pamac causes and which pacman cannot fix when run in the terminal. I’m not sure why it’s intermittent, perhaps it’s affected by logging out/rebooting.

    As a warning it doesn’t prevent me from doing anything, but if it’s something I can fix (even by just not using pamac), then I’d like to :)

    Edit
    I just rebooted, opened a terminal and ran pacman, and the warning was gone. Then I immediately ran the pamac updater, then ran pacman in the terminal again, and then the warning showed up again. I guess pamac is removing the lock, but I don’t understand why pacman is not reinsating the lock if it requires a lock. I know in the past on “Vanilla Arch” I’ve had to manually remove a lock myself (possibly after an unclean exit of pacman in the terminal by me), but thereafter I don’t recall ever seeing a warning about a missing lock file (perhaps I just didn’t run pacman again before a reboot, not sure).

  • I’m not sure if there’s a relationship with this and running pamac just before opening a terminal.

    That’s just what is happening… it’s an old pamac bug. You can just check that pamac is not installing anything and delete that file yourself (if you don’t use pamac, feel free to uninstall it ;)).

    Cheers!

  • Thanks for your reply. I’m sorry for any confusion, but pamac does seem to be leaving a file for me to delete (which is the scenario I am more familiar with prior to using pamac), but instead pamac itself seems to be removing the file, and then pacman complains that the file is missing, rather than present.

    I’ll go ahead and close this topic since it’s a pamac bug :) … oops I don’t see a way to mark it as solved in either the “Topic Tools” or “Edit” areas

  • Hi!
    Like @karasu says you only have to remove the lock file of pacman. Make sure that none application is running pacman (such as the software manager).
    For remove it you only have to run this command at the terminal:
    sudo rm /var/lib/pacman/db.lck
    Do not be afraid of pacman, in my opinion is one of bests packages manager in Linux [Personal opinion]
    Bye!:grinning:

  • Hi @gaolapo,

    I’m not sure how I’m failing in explaining things (or possibly misunderstanding), but there seems to be no file to remove – and that is why pacman complains. I’ve removed the lock manually myself before I ever used Antergos (I was using Vanilla Arch in the past); the warning that it has been removed, already, by something else (pamac), is something new for me entirely :)

    (And it’s only the need to remove it that I’ve ever seen documented on the web, I’ve never seen an instance addressing the warning that it was already removed.)

  • @taliesin

    Wow! And here went my English reading capabilities!

    I think pamac programmers might have screwed up. They tried to fix a bug where sometimes pamac left the lock created, so then pacman or other utilities didn’t work. Therefore, now they are deleting this lock, but the lock is also created by pacman, so deleting it they’re deleting the real pacman lock, not the one created by using pamac.

    Well, that last paragraph was better in my head, but I suppose you understand what I meant.

    My recommendation is to use either pacman or pamac, but not both.

    Cheers!

  • This seems like it might’ve been resolved in the latest (2.4) pamac.

  • Thanks for sharing!

  • For what it’s worth, I have a vanilla Arch install with a Gnome DE.
    Yesterday I wanted to try Pamac and all seemed fine, until today, while updating in the terminal I received the same error. The db.lock file was missing, usually it is in the way. ;)

pacman77 pamac38 Posts 9Views 5046
Log in to reply