msys2/msys2.github.io

failed to init transaction (unable to lock database)

xzhoubayer opened this issue · 1 comments

pacman -S mingw-w64-ucrt-x86_64-gcc
I got the following error message:

error: failed to init transaction (unable to lock database)
error: could not lock database: Permission denied

Run this command rm /var/lib/pacman/db.lck in msys2 or mingw terminal window. To learn more about the issue, this page may help https://wiki.archlinux.org/title/Pacman#%22Failed_to_init_transaction_(unable_to_lock_database)%22_error