VMHeaven
Blog

Troubleshooting

Errors on a fresh server, fixed

Shell errors, missing packages and PATH problems on Linux servers — what causes them and the exact command that fixes each one.

Troubleshooting

wget: command not found — install wget on Linux, macOS and Windows

wget is missing from macOS and most minimal Linux images. Install it on Ubuntu, Debian, RHEL, Alpine, macOS and Windows, or use curl instead.

~5 min19 Sept 2026Read

conda: command not found — initialise conda in bash and zsh

conda is usually installed but never initialised for your shell. Fix 'conda: command not found' in bash, zsh, cron, Docker and on Windows.

~6 min19 Sept 2026

vite: command not found — run the local binary the right way

Vite is a per-project dependency, so your shell cannot see it. Fix 'vite: command not found' with npm scripts, npx, pnpm or yarn — and on servers and CI.

~5 min19 Sept 2026

add-apt-repository: command not found — fix it on Ubuntu and Debian

The command lives in software-properties-common, which minimal images leave out and Debian 13 dropped. Install it, or add repositories by hand.

~5 min19 Sept 2026

VPS high CPU usage: find the process and fix the cause

A VPS pinned at 100% CPU: find the process with top and ps, tell real load from steal time and I/O wait, spot a cryptominer, and cap what you keep.

~7 min19 Sept 2026

VPS keeps rebooting: find out why and stop the restart loop

Tell a clean reboot from a crash with the previous boot's journal, then fix the usual causes: auto-reboots, kernel panics, OOM, watchdogs and host events.

~7 min19 Sept 2026

curl: command not found — how to fix it on any Linux distribution

Why the shell reports 'curl: command not found' and how to install curl on Debian, Ubuntu, Alpine, Rocky, Alma and inside Docker containers.

~5 min08 Aug 2026

npx: command not found — fix it on Linux, macOS and Windows

npx ships with npm, so this error nearly always means Node.js is missing or not on your PATH. Fixes for bash, zsh, nvm, sudo and Docker.

~6 min08 Aug 2026

make: command not found — install build tools the right way

The make binary is not part of a minimal Linux install. How to add it on Debian, Ubuntu, Alpine, Rocky and Alma, and what else you need to compile.

~4 min08 Aug 2026

SSH connection refused — the four causes and how to fix each

'Connection refused' on port 22 means the server said no, not the network. How to check sshd, the port, the firewall and the address — in order.

~6 min08 Aug 2026

Permission denied (publickey) — every reason SSH rejects your key

The SSH connected but your key was refused. The four causes: wrong user, wrong key offered, bad file permissions, or the key was never installed.

~6 min08 Aug 2026

bash: Permission denied — why your script will not run

Permission denied on a script usually means the execute bit is missing, or the file lives on a noexec mount. How to tell which, and fix both safely.

~5 min08 Aug 2026

SSH: Too many authentication failures — the agent is the culprit

This error is usually not a wrong password — your SSH agent offered too many keys before the right one. Fix it with IdentitiesOnly and a clean agent.

~5 min08 Aug 2026

sudo: command not found — install it the right way

sudo is missing on many minimal images and containers. How to install it as root, add your user to the right group, and what to do with no root access.

~5 min08 Aug 2026

docker: command not found — install Docker properly

Docker is never bundled with Linux. Install it from the official repository, fix the 'permission denied' follow-up, and use the modern 'docker compose'.

~5 min08 Aug 2026

git: command not found — install Git on any Linux

Git is not part of a base server or container image. One package installs it on Debian, Ubuntu, Alpine, Rocky, Alma and Arch — plus the config to set first.

~4 min08 Aug 2026

systemctl: command not found — you are not on systemd

This error means the system does not use systemd — a container, Alpine, or SysVinit. Use rc-service, service, or run the process directly instead.

~5 min08 Aug 2026

Could not get lock /var/lib/dpkg/lock — the safe fix

Another process holds the apt lock — often background security updates. How to wait it out, end a stuck process, and clear stale locks without corrupting dpkg.

~5 min08 Aug 2026

nginx 502 Bad Gateway — it is your upstream, not nginx

A 502 means nginx could not reach your app. Read the error log, then fix the four causes: upstream down, wrong socket, timeout, or socket permissions.

~6 min08 Aug 2026

Address already in use (EADDRINUSE) — free the port

Something already holds the port you want. How to find the process, stop it or switch ports, and handle the TIME_WAIT case after a restart.

~5 min08 Aug 2026

No space left on device — even when df shows free space

ENOSPC has three causes: a genuinely full disk, exhausted inodes, or a deleted file still held open. How to diagnose and reclaim space for each.

~6 min08 Aug 2026

MySQL Access denied for root@localhost — the socket, not the password

On modern MySQL/MariaDB, root authenticates by OS identity, not a password. Why 'sudo mysql' works, how to set a password, and how to reset if locked out.

~6 min08 Aug 2026