Loading SQLite Extensions on Linux

September 30, 2025 ยท View on GitHub

SQLite on Linux supports dynamic extension loading via .so shared libraries.

This guide walks through how to load an extension named my_extension.so on common Linux distributions via SQLite3 Command Line.

See the examples folder for language specific examples.


Install SQLite (Per Distribution)

Ubuntu / Debian

sudo apt install sqlite3

Fedora

sudo dnf install sqlite

Arch Linux

pacman -Sy sqlite3

Alpine Linux

apk add sqlite

Note: ensure to download the extension specifically for musl-x86_64 or musl-arm64 targets.


Load Extension from CLI

sqlite3
.load ./my_extension.so
SELECT my_custom_function();

Troubleshooting

ProblemSolution
no such file or directoryEnsure path to .so is correct and matches your platform.
incompatible architectureDownload extension for your Linux system (e.g., x86_64 vs arm64).
Failed to load extension: symbol not foundDownload the extension for musl-x86_64 or musl-arm64 targets