Installing SQLite depends on your operating system. Hereโs how to install it on Windows, macOS, and Linux.
๐ฅ๏ธ Windows
Step 1: Download SQLite
- Go to the official SQLite download page:
๐ https://www.sqlite.org/download.html - Scroll to the section "Precompiled Binaries for Windows".
- Download: https://www.sqlite.org/2025/sqlite-tools-win-x64-3490100.zip
- (SQLite +Tools + DLL )
Step 2: Extract and Setup
- Extract the SQLite Tools ZIP file into d
:\sqlite
(or any folder of your choice). - Copy the full path of the extracted folder (e.g., d
:\sqlite
).
Step 3: Add to System PATH
- Open Start Menu and search for "Environment Variables".
- Click Edit the system environment variables.
- Under System Properties, click Environment Variables.
- In System variables, select Path โ Click Edit.
- Click New, paste the path (d
:\sqlite
), and click OK.
Step 4: Verify Installation
- Open Command Prompt (
cmd
). - Type:
sqlite3
- You should see:
If you see this, SQLite is installed successfully!SQLite version X.X.X Enter ".help" for usage hints. sqlite>
๐ macOS
Option 1: Install via Homebrew (Recommended)
- Open Terminal and run:
brew install sqlite
- Verify the installation:
If it returns a version number, SQLite is installed.sqlite3 --version
Option 2: Install Manually
- Download the macOS binary from SQLite Download Page.
- Extract and move it to
/usr/local/bin
:sudo mv sqlite3 /usr/local/bin/
- Set permissions:
chmod +x /usr/local/bin/sqlite3
- Verify:
sqlite3 --version
๐ง Linux (Ubuntu, Debian, Fedora, etc.)
Install via Package Manager
For Ubuntu/Debian:
sudo apt update
sudo apt install sqlite3 libsqlite3-dev -y
For Fedora:
sudo dnf install sqlite sqlite-devel -y
For Arch Linux:
sudo pacman -S sqlite
Verify Installation
sqlite3 --version
If you see a version number, SQLite is installed successfully.
๐ฏ Next Steps
Now that SQLite is installed, you can:
- Create a database:
sqlite3 mydatabase.db
- Create tables and insert data:
CREATE TABLE employees ( empid INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, email TEXT UNIQUE ); INSERT INTO employees (name, email) VALUES ('John Doe', 'john@example.com');
- View data:
SELECT * FROM employees;
You're ready to use SQLite! ๐ Let me know if you need help.
No comments:
Post a Comment