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

Posted on in Categories FreeBSD, Howto, Troubleshooting, UNIX last updated December 13, 2007

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.

How to mount an ISO image/file under Linux

Posted on in Categories Debian Linux, File system, Howto, Linux, RedHat/Fedora Linux, Suse Linux, Sys admin, Tips, Ubuntu Linux last updated December 25, 2017

An ISO image is an archive file (disk image) of an optical disc using a conventional ISO (International Organization for Standardization) format. ISO image files typically have a file extension of .ISO. The name “ISO” comes from the ISO 9660 file system used with CD-ROM or DVD media, but an ISO image can also contain UDF file system because UDF is backward-compatible to ISO 9660. You can mount an ISO file or images via the loop device under Linux. It is possible to specify transfer functions (for encryption/decryption or other purposes) using loop device.