pkg: sqlite error while executing PRAGMA user_version
m.seaman at infracaninophile.co.uk
Sun Aug 3 13:31:01 UTC 2014
On 03/08/2014 14:09, Wolfgang Hukriede wrote:
> Matthew Seaman wrote:
> # pkg shell
> SQLite version 3.8.5 2014-06-04 14:06:34
> Enter ".help" for usage hints.
> sqlite> select * from pkg_lock ;
> sqlite> select * from pkg_lock_pid ;
> sqlite> .quit
> Yes, this is what I get.
> In the meantime I discovered that "pkg info" works on the diskless box
> when invoked as root. I then tried "pkg upgrade -n" and "pkg upgrade".
> This worked after some contortions. (It first said "locked", while
> the second or third attempt was ok.)
> Becoming somewhat more confident I tried a "pkg delete nnn", but
> interrupted that with control-c. This seems to have been a mistake,
> because now I get "database is locked" consistently and nothing works,
> while output for "select * from pkg_lock" is "1|1|0" and "select *
> from pkg_lock_pid" returns a number (A pid? But there's no process
> with that pid).
> Any way to remove to lock?
OK. This is unsupported and requires you to run SQL commands manually
directly against your local package DB. Fat-finger this and you can
cause catastrophic results. Use at your own risk. Slippery when wet.
Beware of dog.
Backup your database first.
# 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 ;
sqlite> delete from pkg_lock_pid ;
sqlite> select * from pkg_lock_pid ;
We offer no guarantees that the sqlite schema will remain compatible in
any future version of pkg(8). The locking system in particular has been
seen to be in need of attention after recent pkg(8) releases.
Dr Matthew J Seaman MA, D.Phil.
JID: matthew at infracaninophile.co.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1036 bytes
Desc: OpenPGP digital signature
More information about the freebsd-questions