Upgraded from 12-RELEASE to 13.0-CURRENT
FreeBSD% doas su
FreeBSD# pkg update
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD load error: cannot open sqlite3 db: Not a directory
Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
Fetching packagesite.txz: 100% 6 MiB 2.2MB/s 00:03
Unable to create repository FreeBSD
Unable to update repository FreeBSD
Error updating repositories!
Looking at /var/db/pkg the db did exists
The fix is to deinstall/reinstall from ports
After just a bit I have to do it again. Does this in stable pkg and devel version
Additional note, this seems to happen if one is in a path that no longer exists, I did a pwd a moment ago to see where I was and it gave “.” I would think pkg should still work nonetheless
Thanks for that precision, that is exactly what I was missing to reproduce. I will fix asap.
(In reply to Baptiste Daroussin from comment #2)
This may help too. Weirdly I was working in a git dir and switched to master to delete that branch, and tried to use pkg and noticed the dir seemed to disappear and caused pkg issue again. So yeah it is because of current pwd not existing to cause bug it seems; just don’t know what made my dir that existed to disappear :)
Same on 11.3-RELEASE-p3.
In my case I was sitting in a /usr/ports/blah/foo directory that disappeared when a cron job to update the latest tree ran.
I was bitten by this today.
pkg: Repository codelab load error: cannot open sqlite3 db: No such file or directory
Thank you for the info about non existent current directory. That was the problem.
Can it be fixed in pkg or can be the message more informative about what is going on?
Had the same issue today on 12.1 version 1.13.2.
I was standing in /usr/ports/www/node10 and did portsnap extract and then a pkg install failed with: pkg: Repository FreeBSD load error: cannot open sqlite3 db: Not a directory
same problem here.
I was in a directory that did not exist any more