pkg: sqlite error while executing PRAGMA user_version
Wolfgang Hukriede
whukriede at gmail.com
Sun Aug 3 14:23:58 UTC 2014
That was only partly sufficient. No way to backup the database:
# pkg backup -d /var/db/pkg/db-backup
pkg: sqlite error while executing PRAGMA user_version; in file pkgdb.c:2284: database is locked
Ok, leave that for later... Continue with
# pkg shell
SQLite version 3.8.5 2014-06-04 14:06:34
Enter ".help" for usage hints.
sqlite> update pkg_lock set exclusive=0,advisory=0,read=0 ;
sqlite> select * from pkg_lock ;
0|0|0
sqlite> delete from pkg_lock_pid ;
sqlite> select * from pkg_lock_pid ;
sqlite> .quit
Okay, but still:
# pkg info
pkg: sqlite error while executing PRAGMA user_version; in file pkgdb.c:2284: database is locked
I then removed local.sqlite.lock/ by hand. Good, "pkg info" works
again! Then I tried to relax permissions on /var/db/pkg with the idea
to make "pkg info" work for non-root users. "pkg" nicely detects and
defeats this:
> pkg info
pkg: /var/db/pkg permissions (0775) too lax
So, that's impossible. Anyways, I seem to remember that NFS lockfiles
should go to /tmp/ or /var/tmp/ ?
Many thanks!
More information about the freebsd-questions
mailing list