Arch Linux: could not open file /var/lib/pacman/sync

With a fresh install of the Arch’s package manager pacman the user might not be able to open its databases located in /var/lib/pacman/sync .


error: could not open file /var/lib/pacman/sync/testing.db: Failed to open '/var/lib/pacman/sync/testing.db'
error: could not open file /var/lib/pacman/sync/core.db: Failed to open '/var/lib/pacman/sync/core.db'
error: could not open file /var/lib/pacman/sync/extra.db: Failed to open '/var/lib/pacman/sync/extra.db'
error: could not open file /var/lib/pacman/sync/community-testing.db: Failed to open '/var/lib/pacman/sync/community-testing.db'
error: could not open file /var/lib/pacman/sync/community.db: Failed to open '/var/lib/pacman/sync/community.db'
error: could not open file /var/lib/pacman/sync/multilib.db: Failed to open '/var/lib/pacman/sync/multilib.db'

In a bug report someone filed this description:

Pacman 3.5.0 sets the db files according to the umask, which can make them not world readable and hence users might need root privileges to search the db. This is a change since <3.5, since then everything needed to search for packages was set world readable.

After executing pacman -Syy the databases were accessible.

10 Comments

  1. Adrian

    pacman -Syy

  2. slopjong

    What’s your point?

    Did you read “After executing pacman -Syy the databases were accessible” in my article?

  3. thnx

    thank you :) .. that was very useful

  4. asdf

    It works, thx

  5. thanks, I’m an Arch newbie, this solved my problem

  6. K.A

    Thx.
    Really helpful.

  7. Ace, a nice quick fix. Thanks for sharing!

  8. Jerodev

    Didn’t work for me :(

    error: failed to update core (no servers configured for repository)

  9. slopjong

    Did you uncomment a server in /etc/pacman.d/mirrorlist ?

  10. Jerodev

    I did not, thanks! :)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>