Install Packages on OpenBSD 4.x and OpenBSD 5.x

To install binary packages on OpenBSD, the package manager needs to have the correct download URL.  This URL changes based on OpenBSD version and architecture.  Here is how to set it independently:

export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/

Once that is done, the pkg_add command will work. In fact all pkg_* commands will work.


Tags: