How to add programs to the Raspberry Pi 4B?
On a Raspberry Pi 4B (Raspberry Pi OS), you “add programs” mainly in these ways:
1) Easiest (GUI): Add/Remove Software
If you’re using the desktop:
-
Menu → Preferences → Add/Remove Software
-
Search the app → install
This uses the same package system as the terminal (APT).
2) Recommended (Terminal): APT packages
APT is the standard/recommended way to install/update/remove software on Raspberry Pi OS.
Examples:
To update everything:
To remove:
3) Install a downloaded .deb package
If you downloaded a Debian package (must match your architecture: armhf/arm64, not x86_64):
(Using apt install ./file.deb is nice because it pulls dependencies automatically.)
4) Python programs: use APT or a virtual environment (Bookworm change)
On Raspberry Pi OS Bookworm, using pip system-wide is blocked (“externally managed environment”). You should install Python packages either:
-
via APT (
python3-xyz), or -
inside a venv (virtual environment).
A) Prefer APT if available
B) Use venv for pip packages
Exit venv:
5) Flatpak apps (optional “app store” style)
You can enable Flatpak on Raspberry Pi OS, then install apps from Flathub:
Then install an app (example):
6) From source (advanced)
Typical flow:
Quick troubleshooting
-
“Unable to locate package” → run
sudo apt update, or the package name is different. -
Downloaded app won’t run → often it’s the wrong CPU architecture (x86 vs ARM).
-
pip error “externally-managed-environment” → use
apt install python3-xyzor avenv.

评论
发表评论