There are several options for installing drgn.


drgn depends on:

The build requires:

Install dependencies:

Arch Linux:

$ sudo pacman -S --needed gcc libelf make pkgconf python python-pip python-setuptools


$ sudo apt-get install gcc liblzma-dev libelf-dev libdw-dev make pkgconf python3 python3-dev python3-pip python3-setuptools zlib1g-dev

Note that Debian Stretch, Ubuntu Trusty, and Ubuntu Xenial (and older) ship Python versions which are too old. Python 3.6 or newer must be installed manually.


$ sudo dnf install elfutils-devel gcc make pkgconf python3 python3-devel python3-pip python3-setuptools

Optionally, install:

  • libkdumpfile if you want support for kdump-compressed kernel core dumps

Building from the Git repository (rather than a release tarball) additionally requires:

Simply add autoconf automake gawk libtool to the appropriate installation command above.


After installing dependencies, the latest release of drgn can be installed globally with pip:

$ sudo pip3 install drgn
$ drgn --help

The development version can be built and installed manually:

$ git clone
$ cd drgn
$ python3 build
$ sudo python3 install
$ drgn --help

Both of these options can be done in a virtual environment if you do not wish to install drgn globally:

$ python3 -m venv drgnenv
$ source drgnenv/bin/activate
(drgenv) $ pip3 install drgn
(drgenv) $ drgn --help


For development, drgn can be built and run locally:

$ CFLAGS="-Wall -Werror -g -O2" python3 build_ext -i
$ python3 -m drgn --help


drgn supports kdump-compressed kernel core dumps when libkdumpfile is available. libkdumpfile is not packaged for most Linux distributions, so it must be built and installed manually. If it is installed, then drgn is automatically built with support.