|
Article ID: 493
Last updated: 04 Dec, 2025
The NetBSD Packages Collection (pkgsrc) is a third-party software package management system for Unix-like operating systems. Among the over 17,000 packages available in pkgsrc, a few hundred of them have been built on NAS x86_64 systems and are available in the public directory /nasa/pkgsrc. A new collection of software packages is released every quarter by the pkgsrc developers. In addition to new packages or updated versions, each release is largely comprised of the same packages (with identical version numbers) as previous releases. Software Packages Available on NAS SystemsFor a list of software programs that are currently available as packages, see Available Software Modules and Packages. You can also see which pkgsrc modules are currently available by running module avail pkgsrc. For example:
are currently available on NAS systems with x86_64 architecture running TOSS 4. All of the source distributions for building the pkgsrc modules are stored in the /nasa/pkgsrc/distfiles directory. If you plan to build software from source, check to see whether the source distribution is already there before downloading the files from the internet. To view a complete list of all packages and a one-line description of each package on a NAS x86_64 system, load a pkgsrc module and type the pkg_info command without any additional options. If you are looking for a particular package, you can check whether it is available by using the grep command plus a keyword from the output of the pkg_info command. TIP: Because some package names contain capital letters, add -i to the grep command to ignore case distinctions.
For example:
You can also use the -e option to test the existence of a given package. For example: % pkg_info -e cairo cairo-1.16.0nb4 Once you know the package name, you can use additional pkg_info options to find more information about the package. You can specify the full package name, or you can leave out the version number. For example:
or
Some useful options for pkg_info include:
Using PackagesThe root directory of a pkgsrc release (for example, /nasa/pkgsrc/toss4/2023Q3) contains familiar directories such as bin, sbin, lib, include, man, and info. For most packages, you can find their executables, libraries, or include files in these directories. Using an ExecutableWhen you load a pkgsrc module, the paths to its bin and sbin directories are prepended to the PATH environment variable, as shown in the following example. Therefore, you do not need to provide full paths to these directories in order to run executables in them.
Linking a LibraryUnlike the PATH environment variable, loading a pkgsrc module does not set the LD_LIBRARY_PATH environment variable. The reason for this is to prevent libraries in the pkgsrc directory from overriding those with the same filenames at the system default locations or directories that may have been included in your existing LD_LIBRARY_PATH. To link a static library (for example, libcairo.a) in the /nasa/pkgsrc/toss4/2023Q3/lib directory:
To link to a dynamic library (for example, libfftw.so) in the /nasa/pkgsrc/toss4/2023Q3/lib directory, follow the recommendations in the list below, in order of preference. Note: Dynamic libraries have the suffix ".so" rather than the suffix ".a", which is used for static libraries.
For more information about using the setenv command, see man setenv. The files of some packages are not installed in the bin, lib, and include directories. For example, the grace package is installed in the /nasa/pkgsrc/toss4/2023Q3/grace directory, which has its own bin, lib, and include subdirectories. The best way to find the exact location of a file you need from a package is to run the pkg_info command as follows:
Separate modules have been created for some commonly used packages to make them easier to use—you can simply load the modulefile without loading a pkgsrc module. On the NAS x86_64 nodes running TOSS 4, the following modules from pkgsrc have been made available:
Separate modules for other packages can be created when there is demand from the NAS user community. For more information about pkgsrc, see https://www.pkgsrc.org.
Also read
|