Jump to content

# Pkgsrc

From ArchWiki

Related articles

- Pacman
- Arch build system

pkgsrc is a cross-platform package manager. It originates from NetBSD and it has support for GNU/Linux and many other UNIX-like operating systems.

## Installation

This article or section needs language, wiki syntax or style improvements. See Help:Style for reference.

Reason: There is netbsd-pkgsrcAUR, we don't need a copy of upstream instructions for the unprivileged installation. (Discuss in Talk:Pkgsrc)
Note: pkgsrc is not the official package manager of Arch Linux and it's not officially supported by Arch Linux developers.

The safest place to install pkgsrc is your home directory. You need to first fetch the pkgsrc tree that contains package definitions. You can choose between quarterly released snapshot tarballs and bleeding edge development tip version called "-current". You can use CVS or git to fetch the "-current" version of pkgsrc tree. If you want to use the more stable quarterly snapshots, you can just download and extract the snapshot tarball. Note that you need to download the snapshot again to update to next snapshot of the pkgsrc tree.

First, make sure you have installed the base-devel, ncurses, zlib, openssl and procps-ng packages.

To bootstrap pkgsrc, you need to execute the following commands. We will assume that you want to use Git to fetch the development tip version from the Github mirror but you can use any other method you wish to use.

    cd
    git clone --depth 1 https://github.com/NetBSD/pkgsrc.git
    cd ~/pkgsrc/bootstrap
    ./bootstrap --unprivileged

If the bootstrap script was executed successfully, you should add the pkgsrc's `$HOME/pkg/bin` and `$HOME/pkg/sbin` directories to your PATH environment variable.

## Installing packages with pkgsrc

First change directory to desired path in your pkgsrc tree. Let's use `shells/tcsh` as an example.

    ~/pkgsrc/shells/tcsh
    bmake install

Now tcsh should be installed from pkgsrc.

## See also

- The pkgsrc Guide
- NetBSD Wiki - How to use pkgsrc on Linux
- github.com/NetBSD/pkgsrc - GitHub mirror of pkgsrc tree
- pkgsrc.se - A convenient web interface to pkgsrc tree

Category:

- Package manager

Hidden category:

- Pages or sections flagged with Template:Style