pkg-ng problem, how do I recover?

Matthew Seaman matthew at FreeBSD.org
Sun Dec 1 18:05:47 UTC 2013


On 01/12/2013 14:23, james wrote:
> How can I recover from this?
> 
> root at nas:~ # pkg update -f
> Updating repository catalogue
> digests.txz 100% 1093KB   1.1MB/s   1.1MB/s   00:01
> packagesite.txz 100% 5886KB   1.4MB/s   2.0MB/s   00:04
> pkg: sqlite: database disk image is malformed (pkgdb_repo.c:545)
> Incremental update completed, 0 packages processed:
> 0 packages updated, 372 removed and 13769 added.
> pkg: No digest falling back on legacy catalog format
> pkg: http://pkg.FreeBSD.org/freebsd:9:x86:64/latest/repo.txz: Not Found
> root at nas:~ #
> 
> Earlier, I tried to pkgupgrade, but it seemed to get into a loop with
> docbook claiming malformed info, so I quit that.
> 
> This is:
> 
> root at nas:~ # uname -a
> FreeBSD nas 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26
> 22:50:31 UTC 2013
> root at bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
> root at nas:~ #

If pkg(8) complains about a corrupted database, the first thing to try is:

   # rm /var/db/pkg/repo-*.sqlite

The vast majority of the time this will cure the problem, and it's safe
enough to do, as everything in those repo-*.sqlite databases is derived
from repository catalogues which you can just download again.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1036 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20131201/a72a233c/attachment.sig>


More information about the freebsd-questions mailing list