I needed SQLite3 on my Arch-based system for local database work on several projects. The installation turned out to be straightforward, but I learned some specific details about how Pacman handles SQLite packages that are worth documenting.
SQLite installation tutorials
- Multi-Platform SQLite Installation Guide
- Install SQLite3 on Debian Using APT
- Install SQLite3 on Ubuntu Using APT
- Install SQLite3 on macOS (Built-in Installation Guide)
- Install SQLite3 on Fedora/CentOS
- Install SQLite3 on Android (using Termux)
- Install SQLite3 in iOS Apps (Objective C and Swift)
- Install SQLite3 in a Python Virtual Environment
What SQLite3 Actually Provides on Arch Systems
SQLite3 gives you a lightweight, serverless database engine that runs directly on your filesystem. Unlike PostgreSQL or MySQL, there’s no separate server process to manage. You get a command-line tool for database operations and the libraries other applications need to interact with SQLite databases.
On Arch and Manjaro, the package includes:
- The sqlite3 command-line interface
- Shared libraries for application integration
- Development headers for compiling software that depends on SQLite
- Documentation and man pages
Checking for Existing SQLite3 Installation
Before installing anything, I checked whether SQLite3 was already present on my system. Many Arch installations include it as a dependency for other packages.
I ran this command:
sqlite3 --version
If you see version information, SQLite3 is already installed. I got a “command not found” error, so I needed to install it.
I also verified the package status through Pacman:
pacman -Qi sqlite
The “error: package ‘sqlite’ was not found” message confirmed I needed to proceed with installation.
Installing SQLite3 Through Pacman
Pacman manages packages on Arch Linux and Manjaro. The installation requires root privileges, so I used sudo.
I executed:
sudo pacman -S sqlite
Pacman showed me the download size (around 1.5 MB) and installation size (approximately 5 MB). I pressed Y to confirm.
The installation completed in under 10 seconds on my connection. Pacman downloaded the package from the official repositories, verified the signature, and extracted everything to the appropriate system directories.
Verifying the Installation Worked Correctly
After installation, I confirmed SQLite3 was working:
sqlite3 --version
I saw output like “3.45.1 2024-01-30” with additional compilation details. The exact version depends on when you install, since Arch repositories update frequently.
I tested the actual functionality:
sqlite3 test.db "CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);"
sqlite3 test.db "INSERT INTO users (name) VALUES ('test_user');"
sqlite3 test.db "SELECT * FROM users;"
These commands created a test database, added a record, and retrieved it. Seeing the output confirmed SQLite3 was fully operational.
Where Pacman Installed SQLite3 Files
Pacman placed files in standard Linux locations:
/usr/bin/sqlite3
– The command-line executable/usr/lib/libsqlite3.so.*
– Shared libraries/usr/include/sqlite3.h
and related headers – Development files/usr/share/man/man1/sqlite3.1.gz
– Manual page
I checked these locations:
which sqlite3
ls -l /usr/lib/libsqlite3*
Understanding where files live helps when troubleshooting application linking issues or when other software needs to find SQLite3 libraries.
Keeping SQLite3 Updated on Rolling Release Systems
Arch and Manjaro use a rolling release model. Updates arrive continuously rather than in large version jumps.
I update my entire system regularly:
sudo pacman -Syu
That command synchronizes package databases and upgrades all installed packages, including SQLite3. I run it every few days to stay current with security patches and feature updates.
To update only SQLite3:
sudo pacman -S sqlite
Pacman checks if a newer version exists and installs it if available.
Handling Optional Dependencies and Extensions
The base SQLite3 package includes core functionality. Some advanced features require additional setup.
I wanted the readline support for better command-line editing in the SQLite3 shell. Pacman listed readline as an optional dependency during installation. I installed it separately:
sudo pacman -S readline
After installing readline, the SQLite3 shell gained command history and line editing capabilities. I could press the up arrow to recall previous commands.
For certain extensions like JSON1 or full-text search, the Arch package includes them by default in recent versions. I verified available features:
sqlite3 :memory: "PRAGMA compile_options;"
That command showed compilation flags and enabled features.
Troubleshooting Common Installation Issues
I encountered one issue where a partial upgrade left dependency mismatches. Running the full system upgrade resolved it:
sudo pacman -Syu
Arch strongly discourages partial upgrades. The rolling release model expects you to update everything together.
Another person I helped had keyring issues preventing package verification. They fixed it:
sudo pacman -S archlinux-keyring
sudo pacman -Syu
Outdated keyrings sometimes block installations on systems that haven’t updated in weeks.
Using SQLite3 for Local Development Work
Once installed, I created databases for several projects. SQLite3 works well for prototyping, testing, and applications with moderate data needs.
I set up a development database:
mkdir -p ~/projects/myapp/db
cd ~/projects/myapp/db
sqlite3 development.db
Inside the SQLite3 shell, I ran schema creation scripts and populated test data. The database file stayed in my project directory for easy version control and deployment.
For Python projects using SQLite3, no additional drivers were needed. Python’s standard library includes sqlite3 module support. I wrote database code immediately after installation.
Performance Considerations on Arch Systems
SQLite3 on Arch compiles with optimizations enabled. I noticed good performance for read-heavy workloads and transactions under 100k records.
For write-intensive applications, I adjusted pragmas:
PRAGMA journal_mode=WAL;
PRAGMA synchronous=NORMAL;
Write-Ahead Logging (WAL mode) improved concurrent access in web applications. The synchronous setting balanced durability with write speed.
Arch’s package uses system libraries rather than static linking. Applications share one SQLite3 installation, reducing memory overhead when multiple programs use SQLite databases simultaneously.
Comparing Pacman Installation to Other Methods
I could have compiled SQLite3 from source, but Pacman offered clear advantages:
- Automatic dependency resolution
- Easy updates through system package manager
- Integration with other Arch packages
- No manual library path configuration
- Clean removal if needed
The AUR (Arch User Repository) contains SQLite-related packages like database browsers and management tools. I installed DB Browser for SQLite later:
yay -S sqlitebrowser
Using Pacman as the foundation made adding these tools straightforward.
My Current SQLite3 Setup
I now run SQLite3 version 3.45+ on both my Arch desktop and Manjaro laptop. The installation process took less than five minutes total, including verification.
My workflow involves:
- Creating project-specific databases in application directories
- Using the command-line tool for quick queries and maintenance
- Accessing databases through language-specific libraries (Python, Node.js)
- Running regular Pacman updates to maintain current versions
The setup serves local development needs perfectly. For production systems requiring concurrent writes or network access, I use PostgreSQL instead, but SQLite3 handles the majority of my database work.