FreeBSD portupgrade /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:567:in open_db: database file error
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.
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- Linux missing GPG db42a60e key error message
- Download of the day: FreeBSD 7.0 ISO / CD Image
- Unix beats Windows - says Microsoft!
- FreeBSD Download Sun Java JDK and JRE 1.5 Binaries
- HTTP Error 500 Internal server for php pages and solution
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: 2, 2 freebsd, cd command, db database, file error, freebsd errors, freebsd portsdb, freebsd portupgrade, freebsd portupgrade backup, freebsd portupgrade error, pkgdb command, pkg_delete command, ports, portsnap command, portupgrade freebsd, portupgrade open_db error, portupgrade tricks, portupgrade-2.2.2_2, portupgrade-2.4.3_2, rm command, ruby



Recent Comments
Today ~ 3 Comments
Today ~ 7 Comments
Today ~ 4 Comments
Today ~ 8 Comments
Today ~ 7 Comments