FreeBSD portupgrade /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:567:in open_db: database file error

by on December 13, 2007 · 1 comment· LAST UPDATED June 22, 2008

in , ,

The portupgrade command is used to upgrade installed packages via ports or packages. This is one of the tool you need to use under FreeBSD. However, recently, it give me out following error on FreeBSD r6.2-p10-amd64 bit:
...
missing key: categories: Cannot read the portsdb!
/usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:567:in `open_db': database file error
....

The solution is pretty simple tp fix this error, enter:
# rm -f /usr/ports/INDEX*.db /var/db/pkg/pkgdb.db
# pkgdb -fu
# rm -rf /usr/ports
# portsnap fetch && portsnap extract && portsnap update

Next find out current portupgrade version:
# pkg_info | grep portupgrade
Sample output:

portupgrade-2.4.3_2,2 FreeBSD ports/packages administration and management tool s

# pkg_delete portupgrade-2.4.3_2,2
# cd /usr/ports/ports-mgmt/portupgrade && make clean && make install clean
# portupgrade -a

See /usr/ports/UPDATING file for more information.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 1 comment… read it below or add one }

1 Skirmantas March 4, 2010 at 12:56 pm

Thanks;)

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , , , , , , , ,

Previous post:

Next post: