FreeBSD: pkg_version: corrupted record (pkgdep line without argument), ignoring

The error message “pkg_version: corrupted record (pkgdep line without argument), ignoring” indicates that the pkg_version utility is encountering a package database issue on your FreeBSD system. This error is typically caused by a corrupted or incomplete package database, and can occur when you install or remove packages.

Here are the steps you can take to resolve the “pkg_version: corrupted record (pkgdep line without argument), ignoring” error on FreeBSD:

  1. Open a terminal or console window on your FreeBSD system.
  2. Type the following command to update the package database:
sudo pkg update

This command will download the latest package database and update it on your system.

  1. Type the following command to check the integrity of the package database:
sudo pkg check -sa

This command will check the integrity of all installed packages and their dependencies. Any errors or issues will be reported in the output.

  1. If any errors are reported in the output of the pkg check -sa command, you can try to repair them by running the following command:
sudo pkg check -s | awk '/^Broken/ {print $2}' | xargs sudo pkg delete -fy

This command will remove any broken or corrupt packages from your system.

  1. Once you have removed any broken packages, you can try to reinstall them using the pkg install command. For example:
sudo pkg install package-name

Replace package-name with the name of the package that you want to install.

  1. Finally, run the pkg_version utility again to see if the error has been resolved:
sudo pkg_version -vIL=

If the error message no longer appears, then the issue has been resolved.

That’s it! You have resolved the “pkg_version: corrupted record (pkgdep line without argument), ignoring” error on FreeBSD by updating the package database, checking its integrity, and removing any broken packages.

Leave a Comment