Caveat on Software Dependencies

In all integrated software packaging systems such as *BSD ports, Debian packages, RedHat package manager, Darwinports, etc., there exists a complex network of interdependencies that can lead to problems if the user isn't careful.

Many ports/packages in these systems depend on specific versions of other ports/packages, especially with regard to libraries such as QT, OpenMotif, etc. If you have an older or newer version installed, the installation may fail, or worse yet, the installation may succeed and the software will be unstable. Port/package maintainers generally do their best to ensure that the dependencies are listed correctly, so that the software will work properly without being overly fussy about the versions of libraries and other programs it depends on.

Nevertheless, if you have very old ports/packages installed, and decide to update your ports tree to the latest snapshot and install something new, there's a good chance you will run into trouble.

The best way to avoid these problems is by installing all of your ports from the same ports snapshot. This means upgrading your old ports before installing new ones. Within the FreeBSD ports systems, this can be done using "portupgrade -a" (assuming you have installed the "portupgrade" port), or by removing all the installed ports using "pkg_delete -a", and then rebuilding them from the latest ports tree.

In a nutshell, the procedure I recommend for using ports (or any other integrated ports/packages system) is as follows:

  1. Make sure no ports are installed.
    1. Disable anything that depends on a port. E.g., xdm or kdm in /etc/ttys, Samba in /etc/rc.conf, etc.
    2. Delete all ports/packages. This can be done with "pkg_delete -a" on FreeBSD, or "port uninstall installed" on the Mac.
  2. Update your ports tree to the latest snapshot.
  3. Install all your ports.
  4. Don't update your ports tree again until you're ready to reinstall all of your ports. If you need a newer version of a particular port, you can update the framework for just that port instead of updating the whole ports tree. See the documentation for your ports system for details.

Powered by FreeBSD