Binary distribution

The binary packages that are produced by pkgsrc can be used without having to compile everything from source. NetBSD already contains the necessary tools for managing binary packages, on other platforms you need to bootstrap pkgsrc to get the package management tools installed. A browsable list of packages, including links to available binary packages, is here.

Binary packages are available on ftp.NetBSD.org and its mirrors in the directory /pub/pkgsrc/packages/ (see the pkgsrc guide for more details). If the tools for managing binary packages do not exist on a platform or are too old, they are provided along the binary packages in an archive called bootstrap.tar.gz, which must be extracted in the / directory. Then you can run /usr/pkg/sbin/pkg_add to install binary packages. See the pkgsrc guide for detailed instructions.

Source distribution

You can download the pkgsrc tarball or check out the latest sources using AnonCVS:

# cvs checkout pkgsrc

(for using the AnonCVS service, see the Fetching by CVS section in the NetBSD Guide).

After downloading and/or extracting the sources, installing the bootstrap kit should be as simple as:

# cd pkgsrc/bootstrap
# ./bootstrap

This will use the defaults of /usr/pkg for the prefix and /var/db/pkg for the package database directory. However, these can also be set using command-line parameters (use ./bootstrap --help to see the available options).

Note that when using pkgsrc on a non-NetBSD system, use the bmake command instead of make to run NetBSD make, which is required for correct pkgsrc operation. Simply substitute bmake for make in pkgsrc documentation.