[pacman-dev] [pacman 4] error: failed to prepare transaction (could not find database)

Karol Blazewicz karol.blazewicz at gmail.com
Thu Jan 5 23:23:05 EST 2012


If pacman 3.5.4-4 can't connect to a repo that's listed in
pacman.conf, it will throw a bunch of errors

error: could not open file /var/lib/pacman/sync/allanbrokeit.db:
Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db:
Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db:
Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db:
Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db:
Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
error: could not open file /var/lib/pacman/sync/allanbrokeit.db:
Failed to open '/var/lib/pacman/sync/allanbrokeit.db'
...

but will let you update and install packages from other repos. pacman
4.0.1-X errors out:

[karol at black ~]$ pacman -Syu
warning: database file for 'allanbrokeit' does not exist
:: Synchronizing package databases...
 testing is up to date
 community-testing is up to date
 core is up to date
 extra is up to date
 community is up to date
error: failed retrieving file 'allanbrokeit.db' from allanmcrae.com :
The requested URL returned error: 404
error: failed to update allanbrokeit (download library error)
:: Starting full system upgrade...
error: failed to prepare transaction (could not find database)

[karol at black ~]$ pacman -S hdparm
warning: database file for 'allanbrokeit' does not exist
error: failed to prepare transaction (could not find database)

hdparm is in [core].
allanbrokeit repo is already back online, so you have to test it with
some nonexistent repo & db.


The error messages are clear enough and you only have to comment out
the repo that e.g. went offline to "fix" pacman. This behavior may be
a feature [1] but I wanted to make sure this is how it's meant to be.


[1] See Allan's post
https://bbs.archlinux.org/viewtopic.php?pid=1034943#p1034943


More information about the pacman-dev mailing list