HostOnNet Blog

Portupgrade pkgdb.db: unexpected file type or format

Looking for Linux Server Admin or WordPress Expert? We can help.

After upgrading FreeBSD from v6 to 6.1, i tried to upgrade all software installed on the server with portupgrade.
 
I start getting the error
 
[Updating the pkgdb in /var/db/pkg … /var/db/pkg/pkgdb.db: unexpected file type or format — Invalid argument; rebuild needed] [Rebuilding the pkgdb in /var/db/pkg … [Updating the pkgdb in /var/db/pkg … /var/db/pkg/pkgdb.db: unexpected file type or format — Invalid argument; rebuild needed] [Rebuilding the pkgdb in /var/db/pkg … /var/db/pkg/pkgdb.db: unexpected file type or format — Invalid argument: Cannot update the pkgdb!]: Cannot update the pkgdb!]
Command failed [exit code 1]: /usr/local/sbin/pkgdb -aFQ
 
The problem is fixed by deleting the pkgdb.db file
 
 
server26# rm /var/db/pkg/pkgdb.db
 
 

Posted in Uncategorized, Web. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.