pkgsrc logo

Portable Package Management

pkgsrc is a framework for building over 17,000 open source software packages. It is the native package manager on SmartOS, NetBSD, and Minix, and is portable across 23 different operating systems. Use one package manager across all of your systems!

Joyent provide binary packages for SmartOS/illumos, Mac OS X, and Linux.


Screenshots

These example screenshots show just a small number of the 15,000+ binary packages available in our pkgsrc sets. All examples were produced on a clean install of OmniOS r151018 using pkgsrc Xorg.

pkgsrc MATE 1.14.0 on OmniOS

MATE 1.14.0

pkgsrc Xfce 4.12 on OmniOS

Xfce 4.12

pkgsrc KDE 4.14.15 on OmniOS

KDE 4.14.15

pkgsrc Awesome 3.5.5 on OmniOS

Awesome 3.5.5

Choose Your Illumos Package Set

Packages for illumos distributions are built on SmartOS 20141030, but should work on any illumos system of at least that date. If in doubt choose the 64-bit set. Older bootstrap kits are available from the archive.

Use the 64-bit package set. These packages are able to utilise the full x86_64 instruction set architecture and address space, useful for working with large data. This set has the most packages, and often has packages (golang, rust, openjdk8, etc) that are not supported for 32-bit.

#
# Copy and paste the lines below to install the 64-bit set.
#
BOOTSTRAP_TAR="bootstrap-2017Q2-x86_64.tar.gz"
BOOTSTRAP_SHA="76395983001441108c3ca3ed77d6e071387cc2f5"

# Download the bootstrap kit to the current directory.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}

# Verify the SHA1 checksum.
[ "${BOOTSTRAP_SHA}" = "$(/bin/digest -a sha1 ${BOOTSTRAP_TAR})" ] || echo "ERROR: checksum failure"

# Verify PGP signature.  This step is optional, and requires gpg.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}.asc
curl -sS https://pkgsrc.joyent.com/pgp/DE817B8E.asc | gpg --import
gpg --verify ${BOOTSTRAP_TAR}{.asc,}

# Install bootstrap kit to /opt/local
tar -zxpf ${BOOTSTRAP_TAR} -C /

# Add to PATH/MANPATH.
PATH=/opt/local/sbin:/opt/local/bin:$PATH
MANPATH=/opt/local/man:$MANPATH

Use the 32-bit package set. 32-bit binaries will use less memory, and in some cases may be faster than 64-bit, but will not be able to use the full 64-bit address space, and some packages (golang, rust, openjdk8, etc) are not supported or available for 32-bit.

#
# Copy and paste the lines below to install the 32-bit set.
#
BOOTSTRAP_TAR="bootstrap-2017Q2-i386.tar.gz"
BOOTSTRAP_SHA="f952069a2054d2ed48a0d73e3726a0cb817de144"

# Download the bootstrap kit to the current directory.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}

# Verify the SHA1 checksum.
[ "${BOOTSTRAP_SHA}" = "$(/bin/digest -a sha1 ${BOOTSTRAP_TAR})" ] || echo "ERROR: checksum failure"

# Verify PGP signature.  This step is optional, and requires gpg.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}.asc
curl -sS https://pkgsrc.joyent.com/pgp/DE817B8E.asc | gpg --import
gpg --verify ${BOOTSTRAP_TAR}{.asc,}

# Install bootstrap kit to /opt/local
tar -zxpf ${BOOTSTRAP_TAR} -C /

# Add to PATH/MANPATH.
PATH=/opt/local/sbin:/opt/local/bin:$PATH
MANPATH=/opt/local/man:$MANPATH

Use the 32-bit multiarch package set. This is similar to the main 32-bit set, but a number of packages (currently around 350) also include 64-bit libraries. This set is only useful if you need to compile third-party software against both 32-bit and 64-bit libraries, otherwise you are better off using either the dedicated 32-bit or 64-bit sets.

#
# Copy and paste the lines below to install the 32-bit multiarch set.
#
BOOTSTRAP_TAR="bootstrap-2017Q2-multiarch.tar.gz"
BOOTSTRAP_SHA="e431fafdba66850b3f33fb988ca780aac6b165bb"

# Download the bootstrap kit to the current directory.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}

# Verify the SHA1 checksum.
[ "${BOOTSTRAP_SHA}" = "$(/bin/digest -a sha1 ${BOOTSTRAP_TAR})" ] || echo "ERROR: checksum failure"

# Verify PGP signature.  This step is optional, and requires gpg.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}.asc
curl -sS https://pkgsrc.joyent.com/pgp/DE817B8E.asc | gpg --import
gpg --verify ${BOOTSTRAP_TAR}{.asc,}

# Install bootstrap kit to /opt/local
tar -zxpf ${BOOTSTRAP_TAR} -C /

# Add to PATH/MANPATH.
PATH=/opt/local/sbin:/opt/local/bin:$PATH
MANPATH=/opt/local/man:$MANPATH

Use the 64-bit "tools" set. This is a special limited set, used primarily for package development, but also suitable for installing into the SmartOS Global Zone. Note that this set uses the /opt/tools prefix.

#
# Copy and paste the lines below to install the 64-bit tools set.
#
BOOTSTRAP_TAR="bootstrap-2017Q2-tools.tar.gz"
BOOTSTRAP_SHA="f61644da2871f1377774196fd3f2eb6c7c9db228"

# Download the bootstrap kit to the current directory.  Note that we currently
# pass "-k" to skip SSL certificate checks as the GZ doesn't install them.
curl -kO https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}

# Verify the SHA1 checksum.
[ "${BOOTSTRAP_SHA}" = "$(/bin/digest -a sha1 ${BOOTSTRAP_TAR})" ] || echo "ERROR: checksum failure"

# Verify PGP signature.  This step is optional, and requires gpg.
curl -kO https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}.asc
curl -sS https://pkgsrc.joyent.com/pgp/DE817B8E.asc | gpg --import
gpg --verify ${BOOTSTRAP_TAR}{.asc,}

# Install bootstrap kit to /opt/tools
tar -zxpf ${BOOTSTRAP_TAR} -C /

# Add to PATH/MANPATH.
PATH=/opt/tools/sbin:/opt/tools/bin:$PATH
MANPATH=/opt/tools/man:$MANPATH

Upgrades

Upgrades aren't fully supported (we don't yet handle major configuration changes) but this procedure may work fine for many users and avoid having to re-bootstrap. If in doubt ensure you have backed up your data and configuration files. Make sure you use the same set that was originally installed.

#
# Copy and paste the lines below to upgrade the 64-bit set.
#
UPGRADE_TAR="bootstrap-2017Q2-x86_64-upgrade.tar.gz"
UPGRADE_SHA="d574519519aa42dd87e11aabf8148d38d24afae9"

# Download the upgrade kit to the current directory.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR}

# Verify the SHA1 checksum.
[ "${UPGRADE_SHA}" = "$(/bin/digest -a sha1 ${UPGRADE_TAR})" ] || echo "ERROR: checksum failure"

# Verify PGP signature.  This step is optional, and requires gpg.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR}.asc
curl -sS https://pkgsrc.joyent.com/pgp/DE817B8E.asc | gpg --import
gpg --verify ${UPGRADE_TAR}{.asc,}

# Ensure you are running the latest package tools.
PKG_PATH=http://pkgsrc.joyent.com/packages/SmartOS/2017Q2/x86_64/All pkg_add -U pkg_install pkgin

# Unpack upgrade kit to /opt/local
tar -zxpf ${UPGRADE_TAR} -C /

# Upgrade all packages.
pkgin full-upgrade

#
# Copy and paste the lines below to upgrade the 32-bit set.
#
UPGRADE_TAR="bootstrap-2017Q2-i386-upgrade.tar.gz"
UPGRADE_SHA="e91b1829b02fad1bb6217e9a0807ae3bc969f80b"

# Download the upgrade kit to the current directory.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR}

# Verify the SHA1 checksum.
[ "${UPGRADE_SHA}" = "$(/bin/digest -a sha1 ${UPGRADE_TAR})" ] || echo "ERROR: checksum failure"

# Verify PGP signature.  This step is optional, and requires gpg.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR}.asc
curl -sS https://pkgsrc.joyent.com/pgp/DE817B8E.asc | gpg --import
gpg --verify ${UPGRADE_TAR}{.asc,}

# Ensure you are running the latest package tools.
PKG_PATH=http://pkgsrc.joyent.com/packages/SmartOS/2017Q2/i386/All pkg_add -U pkg_install pkgin

# Unpack upgrade kit to /opt/local
tar -zxpf ${UPGRADE_TAR} -C /

# Upgrade all packages.
pkgin full-upgrade

#
# Copy and paste the lines below to upgrade the 32-bit multiarch set.
#
UPGRADE_TAR="bootstrap-2017Q2-multiarch-upgrade.tar.gz"
UPGRADE_SHA="beba9d685237cf8a009d496c2204da2b8c288788"

# Download the upgrade kit to the current directory.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR}

# Verify the SHA1 checksum.
[ "${UPGRADE_SHA}" = "$(/bin/digest -a sha1 ${UPGRADE_TAR})" ] || echo "ERROR: checksum failure"

# Verify PGP signature.  This step is optional, and requires gpg.
curl -O https://pkgsrc.joyent.com/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR}.asc
curl -sS https://pkgsrc.joyent.com/pgp/DE817B8E.asc | gpg --import
gpg --verify ${UPGRADE_TAR}{.asc,}

# Ensure you are running the latest package tools.
PKG_PATH=http://pkgsrc.joyent.com/packages/SmartOS/2017Q2/multiarch/All pkg_add -U pkg_install pkgin

# Unpack upgrade kit to /opt/local
tar -zxpf ${UPGRADE_TAR} -C /

# Upgrade all packages.
pkgin full-upgrade

#
# Copy and paste the lines below to upgrade the 64-bit tools set.
#
UPGRADE_TAR="bootstrap-2017Q2-tools-upgrade.tar.gz"
UPGRADE_SHA="ae1770116ddb0d275512854307e07ef45eb32fec"

# Download the upgrade kit to the current directory.  Note that we currently
# pass "-k" to skip SSL certificate checks as the GZ doesn't install them.
curl -kO https://pkgsrc.joyent.com/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR}

# Verify the SHA1 checksum.
[ "${UPGRADE_SHA}" = "$(/bin/digest -a sha1 ${UPGRADE_TAR})" ] || echo "ERROR: checksum failure"

# Verify PGP signature.  This step is optional, and requires gpg.
curl -kO https://pkgsrc.joyent.com/packages/SmartOS/bootstrap-upgrade/${UPGRADE_TAR}.asc
curl -sS https://pkgsrc.joyent.com/pgp/DE817B8E.asc | gpg --import
gpg --verify ${UPGRADE_TAR}{.asc,}

# Ensure you are running the latest package tools.
PKG_PATH=http://pkgsrc.joyent.com/packages/SmartOS/2017Q2/tools/All pkg_add -U pkg_install pkgin

# Unpack upgrade kit to /opt/tools
tar -zxpf ${UPGRADE_TAR} -C /

# Upgrade all packages.
pkgin full-upgrade

Post-Install Steps

Now that you're ready to go, here are some common commands you may want to run.

Use pkgin to install packages

pkgin is the front-end to the binary packages, and lets you search for, install, upgrade, and remove packages. It also provides some basic functionality for querying both local and remote packages. If you have used apt-get or yum you should find it to be very familiar.

Use pkg_* tools to manage packages

The underlying packaging tools are pkg_add, pkg_admin, pkg_create, pkg_delete, and pkg_info. If pkgin is equivalent to apt-get or yum, then these are the equivalent of dpkg or rpm. Here are some useful commands to get you started.

: Refresh the pkgin database with the latest version
$ sudo pkgin -y update

: Search for a package.  Regular expressions are supported.
$ pkgin search "^ffmpeg[0-9]$"
ffmpeg3-3.0.1   Decoding, encoding and streaming software (v3.x)
ffmpeg2-2.8.6   Decoding, encoding and streaming software (v2.x)
ffmpeg1-1.2.12  Decoding, encoding and streaming software (v1.x)

: Install a package without prompting
$ sudo pkgin -y install ffmpeg3

: List all available packages
$ pkgin avail

: Upgrade all out-of-date packages
$ sudo pkgin -y full-upgrade

: Remove a package
$ sudo pkgin -y remove ffmpeg2

: Automatically remove orphaned dependencies
$ sudo pkgin -y autoremove
: See what packages are installed.
$ pkg_info

: See what package a file belongs to.
$ pkg_info -Fe /opt/local/bin/node
nodejs-4.4.3

: List the contents of a package.
$ pkg_info -qL nodejs
/opt/local/bin/node
/opt/local/bin/npm
[...]

: Perform an audit of all currently installed packages.
$ sudo pkg_admin fetch-pkg-vulnerabilities
$ pkg_admin audit
Package jasper-1.900.1nb11 has a integer-overflow vulnerability, see http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3520
Package samba-3.6.25nb3 has a privilege-escalation vulnerability, see https://www.samba.org/samba/security/CVE-2015-5299.html
Package tiff-4.0.6 has a arbitrary-memory-access vulnerability, see http://www.securityfocus.com/archive/1/537205
[...]

: Create a binary package from some metadata files and package directory.
$ pkg_create -B build-info -c comment -d description -f packlist -I /opt/local -p files/ -U foo-1.0.tgz