I’m using FreeBSD, and keeping it up to date with the ports collection is normally a fairly simple thing to do.
- Make sure DNS is working (check you /etc/resolve.conf file)
- #
portsnap fetch
- #
portsnap update
- #
portupgrade -a
Only, today I got a strange error message doing the portupgrade:
/var/db/pkg/pkgdb.db: unexpected file type or format — Invalid argument
Whether something broke, got disconnected, terminated in the middle of processing, or the database format or version changed, I dunno.
However, the fix is easy. Get rid of the problem files, and let portupgrade rebuild them.
# rm /var/db/pkg/pkgdb.db
# rm /usr/ports/INDEX*.db
# portupgrade -a