pkg: sqlite error while executing sqlite open in file pkgdb.c:1126: unable to open database file

Vidar Karlsen vidar at karlsen.tech
Thu Oct 12 05:47:14 UTC 2017


> On 12 Oct 2017, at 01:15, Kevin Oberman <rkoberman at gmail.com> wrote:
> 
> On Wed, Oct 11, 2017 at 11:15 AM, Jos Chrispijn <bsdports at cloudzeeland.nl <mailto:bsdports at cloudzeeland.nl>>
> wrote:
> 
>> Dear group,
>> 
>> Apparently I have an issue when finalizing the ports with portmanager.
-snip-
>> ===>>> Returning to update check of installed ports
>> ===>>> Update check of installed ports complete
>> pkg: sqlite error while executing sqlite open in file pkgdb.c:1126: unable
>> to open database file
-snip-
> While you are using portmaster(8), portmaster, in turn, uses pkg and the
> pkg database which is sqlite  So the pkg suggestions are likely reasonable.
> It looks like the db is missing, seriously damaged, has protections that
> keep portmaster from accessing it, or your db is not in the right pkg is
> looking for it.

Also check if your current work dir has been deleted, say, as a consequence of
running portsnap update for example. That can also trigger this error:

vidar at cube ~% mkdir -p one/two
vidar at cube ~% cd one/two
vidar at cube ~/one/two% rm -rf ~/one
vidar at cube ~/one/two% pkg info
pkg: sqlite error while executing sqlite open in file pkgdb.c:1126: unable to open database file

— 
Vidar Karlsen


More information about the freebsd-ports mailing list