Search Shortcut cmd + k | ctrl + k
Search cmd+k ctrl+k
1.0 (stable)
Building Instructions

Prerequisites

DuckDB needs CMake and a C++11-compliant compiler (e.g., GCC, Apple-Clang, MSVC). Additionally, we recommend using the Ninja build system, which automatically parallelizes the build process.

Clone the DuckDB repository.

git clone https://github.com/duckdb/duckdb

We recommend creating a full clone of the repository. Note that the directory uses approximately 1.2 GB of disk space.

Linux Packages

Install the required packages with the package manager of your distribution.

Ubuntu and Debian:

sudo apt-get update && sudo apt-get install -y git g++ cmake ninja-build libssl-dev

Fedora, CentOS, and Red Hat:

sudo yum install -y git g++ cmake ninja-build openssl-devel

Alpine Linux:

apk add g++ git make cmake ninja

macOS

Install Xcode and Homebrew. Then, install the required packages with:

brew install cmake ninja

Windows

Consult the Windows CI workflow for a list of packages used to build DuckDB on Windows.

On Windows, the DuckDB Python package requires the Microsoft Visual C++ Redistributable package to be built and to run.

Building DuckDB

To build DuckDB we use a Makefile which in turn calls into CMake. We also advise using Ninja as the generator for CMake.

GEN=ninja make

Bestpractice It is not advised to directly call CMake, as the Makefile sets certain variables that are crucial to properly building the package.

About this page

Last modified: 2024-07-22