AlmaLinuxRHEL Based

How To Install DuckDB on AlmaLinux 10

Install DuckDB on AlmaLinux 10

If you manage Linux servers and work with large datasets, you’ve probably hit the wall with traditional databases that require heavyweight setup just to run a quick analytical query. DuckDB solves that problem — it’s a fast, embedded, in-process SQL database built specifically for analytics, and it runs with zero infrastructure overhead. In this guide, you’ll learn exactly how to install DuckDB on AlmaLinux 10 using four different methods, so you can pick the one that fits your environment and get to work fast.

AlmaLinux 10 (codenamed “Purple Lion”) is an enterprise-grade, RHEL 10-compatible Linux distribution released in May 2025, supported through 2035. It ships with kernel 6.12, Python 3.12+, and updated toolchains — making it an excellent host for modern data tooling like DuckDB. Whether you’re a sysadmin setting up a data pipeline, a developer building analytics features, or a beginner exploring Linux server tools, this tutorial covers everything you need.

By the end of this guide, you will have DuckDB installed, verified, and running your first query on AlmaLinux 10. The current stable LTS version is DuckDB 1.4.4, released January 26, 2026, with support until September 2026.

What Is DuckDB and Why Does It Matter?

DuckDB is an open-source, in-process SQL OLAP (Online Analytical Processing) database management system. Unlike traditional databases like MySQL or PostgreSQL, DuckDB runs directly inside your application process — no separate server, no daemon, no complex configuration.

It uses columnar storage and vectorized query execution, which means it can crunch through millions of rows significantly faster than row-oriented databases for read-heavy workloads. DuckDB supports standard SQL including window functions, CTEs, and complex aggregations right out of the box.

Here’s what makes DuckDB particularly powerful on a Linux server:

  • Zero server setup — runs as a single binary or Python package
  • Direct file querying — read CSV, JSON, and Parquet files as if they were tables
  • Portable — works on x86_64 and aarch64 architectures
  • MIT licensed — fully open source with active community support
  • Python-native — integrates seamlessly with pandas, polars, and Jupyter

DuckDB is not designed for high-concurrency transactional writes (that’s PostgreSQL’s job). Its sweet spot is analytical queries, ETL preprocessing, log analysis, and data science workflows — exactly the kinds of tasks you often need on an AlmaLinux server.

[IMAGE: Diagram comparing DuckDB OLAP vs PostgreSQL OLTP architecture]

Why Install DuckDB on AlmaLinux 10?

AlmaLinux 10 brings several features that make it an ideal platform for a DuckDB setup. It features improved SELinux policies, post-quantum cryptography support, and enhanced system security tooling. The long-term support window through 2035 means you can build production workflows on this stack today without worrying about OS-level migrations soon.

From a practical standpoint, AlmaLinux 10’s use of dnf as the package manager and its clean RPM-based architecture work well with DuckDB’s self-contained binary distribution model. Since DuckDB doesn’t ship in the default AlmaLinux repositories, you’ll install it directly from the official DuckDB project — which is straightforward and well-documented.

Prerequisites

Before you begin, make sure your environment meets these requirements:

  • Operating System: AlmaLinux 10 (any minor release — 10.0, 10.1+)
  • User privileges: A non-root user with sudo access, or direct root access
  • Internet connectivity: Required for downloading binaries and packages
  • Architecture: x86_64 or aarch64 (ARM) — both are supported
  • Minimum hardware: 1 vCPU, 1 GB RAM (2 GB recommended for analytics)
  • Required tools: curl, wget, unzip — all available via dnf
  • Python (optional): Python 3.12+ if using the pip installation method

Check your AlmaLinux version and architecture before proceeding:

cat /etc/almalinux-release
uname -m

Expected output:

AlmaLinux release 10.1 (Purple Lion)
x86_64

[LINK: AlmaLinux 10 Initial Server Setup Guide]

Step 1: Update Your AlmaLinux 10 System

Always update your system before installing new software. This ensures you have the latest security patches, updated shared libraries, and avoids dependency conflicts during installation.

sudo dnf update -y

This command tells dnf to update all installed packages without asking for confirmation (-y flag). On a fresh AlmaLinux 10 install, this might take a few minutes.

Once the update finishes, optionally reboot your system if a kernel update was applied:

sudo reboot

After reboot, reconnect and confirm your system is current:

sudo dnf check-update

If the output is empty, your system is fully up to date. You’re ready to proceed.

[IMAGE: Terminal screenshot showing successful dnf update -y output on AlmaLinux 10]

Step 2: Install Required Utilities

You need a few basic tools installed before downloading DuckDB. Most of these come pre-installed on AlmaLinux 10 minimal installs, but let’s confirm and install anything missing.

sudo dnf install -y curl wget unzip

Here’s what each tool does:

  • curl — Downloads files and scripts from the internet; used by the DuckDB install script
  • wget — Alternative file downloader; useful for direct binary downloads
  • unzip — Extracts .zip archives; needed for the manual binary method

Verify each tool is available:

curl --version
wget --version
unzip -v

If any command returns a “not found” error, re-run the install command above. Once all three are confirmed, you’re ready to install DuckDB.

Step 3: Install DuckDB on AlmaLinux 10 — Choose Your Method

This is the core section of this guide. You have four installation methods available. Pick the one that fits your use case:

Method Best For Difficulty
Install Script (Method 1) Most users — fastest and recommended Easy
Direct Binary Download (Method 2) Offline/air-gapped environments Easy
Build from Source (Method 3) Developers needing custom builds Advanced
Python pip (Method 4) Data scientists and Python developers Easy

Method 1: Install DuckDB Using the Official Install Script (Recommended)

This is the fastest and most maintainable method for your DuckDB setup. The official DuckDB install script downloads the latest stable binary, places it in your home directory, and guides you through adding it to your PATH.

Run the Install Script

curl https://install.duckdb.org | sh

This downloads and executes the official install script from the DuckDB project. It automatically detects your architecture (x86_64 or aarch64) and installs the correct binary.

Security note: In production environments, always review scripts before piping to shell. You can inspect the script first with curl https://install.duckdb.org before running it.

Expected output:

*** DuckDB Linux/MacOS installation script, version 1.4.4 ***

Successfully installed DuckDB binary to /home/youruser/.duckdb/cli/1.4.4/duckdb
with a link from /home/youruser/.duckdb/cli/latest/duckdb

Hint: Append the following line to your shell profile:
export PATH='/home/youruser/.duckdb/cli/latest':$PATH

Add DuckDB to Your PATH

The script installs DuckDB to ~/.duckdb/cli/latest/duckdb but does not automatically update your shell PATH. Add it now for the current session:

export PATH="$HOME/.duckdb/cli/latest:$PATH"

For permanent access across all future sessions, append the export line to your bash profile:

echo 'export PATH="$HOME/.duckdb/cli/latest:$PATH"' >> ~/.bashrc
source ~/.bashrc

If you use Zsh, replace ~/.bashrc with ~/.zshrc.

Verify the Installation

duckdb --version

Expected output:

v1.4.4 1a89b93baf

If you see a version number, DuckDB is installed and working correctly. Proceed to Step 4 to run your first query.

Method 2: Install DuckDB via Direct Binary Download

Use this method when you can’t use curl | sh — such as restricted security policies, air-gapped servers, or when you need a specific version to configure DuckDB on AlmaLinux.

Download the Binary

For x86_64 systems:

wget https://github.com/duckdb/duckdb/releases/latest/download/duckdb_cli-linux-amd64.zip

For aarch64 (ARM) systems:

wget https://github.com/duckdb/duckdb/releases/latest/download/duckdb_cli-linux-aarch64.zip

Extract the Archive

unzip duckdb_cli-linux-amd64.zip

This extracts a single file named duckdb to your current directory.

Move Binary to System PATH

sudo mv duckdb /usr/local/bin/
sudo chmod +x /usr/local/bin/duckdb

The chmod +x command makes the binary executable. Verify with:

duckdb --version

Method 3: Build DuckDB from Source on AlmaLinux 10

This method is for developers who need a custom-compiled build, want to contribute to DuckDB, or need a version not available as a pre-built binary.

Install Build Dependencies

sudo dnf install -y git gcc-c++ cmake ninja-build openssl-devel

Each package serves a purpose:

  • git — Clones the DuckDB source repository
  • gcc-c++ — The C++ compiler required to build DuckDB
  • cmake — Cross-platform build system generator
  • ninja-build — Fast build tool that significantly speeds up compilation
  • openssl-devel — SSL header files required by some DuckDB extensions

Clone the DuckDB Repository

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

Compile the Binary

GEN=ninja make

The GEN=ninja variable instructs the build system to use Ninja instead of the default Make backend, which is significantly faster. Compilation typically takes 10–30 minutes depending on your CPU and RAM.

Expected output when complete:

[100%] Built target duckdb_shell

Install the Binary

sudo cp build/release/duckdb /usr/local/bin/
duckdb --version

Method 4: Install DuckDB Python Package via pip

If you work in Python — whether for data science, ETL pipelines, or application development — this method gives you DuckDB directly within your Python environment.

Verify Python 3 and pip

AlmaLinux 10 ships with Python 3.12+ by default. Confirm:

python3 --version
pip3 --version

If pip is not installed:

sudo dnf install -y python3-pip

Create a Virtual Environment (Recommended)

python3 -m venv duckenv
source duckenv/bin/activate

Your prompt should now show (duckenv) at the start, confirming the environment is active.

Install DuckDB

pip install duckdb

Verify the Python Installation

import duckdb
print(duckdb.__version__)

con = duckdb.connect()
result = con.execute("SELECT 42 AS answer").fetchone()
print(result)

Expected output:

1.4.4
(42,)

Step 4: Run Your First DuckDB Database

Now that DuckDB is installed, let’s create a real persistent database and run some queries. This goes beyond a version check — you want to confirm that everything actually works end-to-end.

Create a Persistent Database File

By default, DuckDB runs in-memory, meaning data is lost when you close the session. To persist data, specify a file path when launching:

duckdb /home/$USER/mydata.db

DuckDB creates the file if it doesn’t exist. You’ll see the DuckDB prompt:

v1.4.4 1a89b93baf
Enter ".help" for usage hints.
D

Create a Table and Query It

CREATE TABLE employees (
    id INTEGER,
    name VARCHAR,
    department VARCHAR
);

INSERT INTO employees VALUES (1, 'Alice', 'Engineering');
INSERT INTO employees VALUES (2, 'Bob', 'Analytics');
INSERT INTO employees VALUES (3, 'Carol', 'DevOps');

SELECT * FROM employees;

Expected output:

┌───────┬─────────┬─────────────┐
│  id   │  name   │ department  │
│ int32 │ varchar │   varchar   │
├───────┼─────────┼─────────────┤
│     1 │ Alice   │ Engineering │
│     2 │ Bob     │ Analytics   │
│     3 │ Carol   │ DevOps      │
└───────┴─────────┴─────────────┘

Query a CSV File Directly

One of DuckDB’s most powerful features is querying flat files without importing them:

SELECT * FROM read_csv_auto('/path/to/your/data.csv') LIMIT 10;

This reads the file directly from disk and treats it as a SQL table — no ETL step required. Exit the shell when done:

.quit

Step 5: Install DuckDB Extensions

DuckDB extensions add optional functionality without bloating the core binary. You install and load them from within the DuckDB shell.

Installing Common Extensions

INSTALL httpfs;
LOAD httpfs;

The most useful extensions for AlmaLinux server deployments:

  • httpfs — Read files over HTTP or from S3-compatible storage
  • json — Native JSON querying and manipulation
  • parquet — Parquet file support (included by default in most builds)
  • postgres_scanner — Query PostgreSQL tables directly from DuckDB
  • sqlite_scanner — Read SQLite database files

Extensions are stored in ~/.duckdb/extensions/. They persist across sessions and only need reloading with LOAD extension_name; each new session.

[LINK: DuckDB Extensions Guide: httpfs, Parquet, and Postgres Scanner]

Step 6: Update or Uninstall DuckDB

Keeping DuckDB current matters — the 1.4 LTS line receives security patches and performance fixes regularly.

Updating DuckDB (Install Script Method)

Simply re-run the install script. It detects the existing installation and updates to the latest version:

curl https://install.duckdb.org | sh
source ~/.bashrc
duckdb --version

Installing a Specific Version

curl https://install.duckdb.org | DUCKDB_VERSION=1.4.4 sh

Uninstalling DuckDB

For the install script method:

rm -rf ~/.duckdb

For system-wide installations (Methods 2 and 3):

sudo rm /usr/local/bin/duckdb

For the Python package:

pip uninstall duckdb

Troubleshooting Common Issues

Even with a straightforward installation, things occasionally go wrong. Here are the most common problems and their solutions when you configure DuckDB on AlmaLinux.

Error 1: duckdb: command not found

Cause: The DuckDB binary location is not in your $PATH.

Fix:

export PATH="$HOME/.duckdb/cli/latest:$PATH"
echo 'export PATH="$HOME/.duckdb/cli/latest:$PATH"' >> ~/.bashrc
source ~/.bashrc

Verify with which duckdb — it should return the full binary path.

Error 2: curl: command not found

Cause: curl is not installed on your AlmaLinux 10 system.

Fix:

sudo dnf install -y curl

Error 3: Build Fails — ninja: command not found or Missing Headers

Cause: Build dependencies were not fully installed.

Fix:

sudo dnf install -y ninja-build gcc-c++ cmake openssl-devel

Then re-run the build with GEN=ninja make from the DuckDB source directory.

Error 4: Permission Denied When Running the Binary

Cause: The binary file is not marked as executable.

Fix:

sudo chmod +x /usr/local/bin/duckdb

Error 5: SELinux Blocking Execution

Cause: AlmaLinux 10’s SELinux policies may block executing binaries from non-standard locations like ~/.duckdb/.

Fix: Either move the binary to /usr/local/bin/ (recommended), or restore the correct SELinux context:

sudo restorecon -v ~/.duckdb/cli/latest/duckdb

If that doesn’t work, check the audit log for the specific denial:

sudo ausearch -m avc -ts recent

Congratulations! You have successfully installed DuckDB. Thanks for using this tutorial for installing DuckDB open-source column-oriented relational database management system (RDBMS) on AlmaLinux OS 10 system. For additional help or useful information, we recommend you check the official DuckDB website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a dedicated and highly skilled Linux Systems Administrator with over a decade of progressive experience in designing, deploying, and maintaining enterprise-grade Linux infrastructure. His professional journey began in the telecommunications industry, where early exposure to Unix-based operating systems ignited a deep and enduring passion for open-source technologies and server administration.​ Throughout his career, r00t has demonstrated exceptional proficiency in managing large-scale Linux environments, overseeing more than 300 servers across development, staging, and production platforms while consistently achieving 99.9% system uptime. He holds advanced competencies in Red Hat Enterprise Linux (RHEL), Debian, and Ubuntu distributions, complemented by hands-on expertise in automation tools such as Ansible, Terraform, Bash scripting, and Python.
Back to top button