Why "error: failed to synchronize all databases"?

why ? is it because i am on liveusb, hence can’t update ?

$ sudo pacman -Syu
:: 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 update endeavouros (unable to lock database)
error: failed to synchronize all databases

i want to use vim now to record some good terminal cmd… i have a note that is to gather all the useful cmd… which i normally used vim to do…
but when i try to download it… got error.

$ sudo pacman -S vim
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

It probably means some other updater is already running. Wait a couple of minutes and try again.

That being said, why would you do a full system update on a live usb?

1 Like

ok. i got it, it is because i have not yet press “Y” on the previous "Replace bind-tools with extra/bind?" issue. lol

i want to update it because i want to install yay to install vim…
do i need to install yay to install vim ?
on a livecd ?

Two things

  • Isn’t yay on the livecd already?
  • No, you can use pacman to install vim, sudo pacman -S vim
1 Like

since you already taught me how to install vim on pacman, can you also tell me how to install in yay ? i never use yay before. just wonder what is the different between the 2. i know yay can install anything outside of arch repo… but pamac also can install outside of arch repo and it also have command line also.

It works almost exactly the same way except you don’t use sudo

yay -S vim

The difference between the two is that yay can install packages from both the repos and AUR. pacman can only install packages from the repos.

1 Like