Troubleshoot
LinuxErrorsNetworkingDocker

curl: command not found — Fix for Ubuntu, Alpine & CentOS

Fix 'curl: command not found' on Ubuntu, Debian, Alpine, CentOS, and Docker. curl is missing on minimal Linux images — one-line install per distro.

May 9, 2026·2 min read

curl: command not found — Fix for Ubuntu, Alpine & CentOS

curl: command not found appears on minimal Linux images, Alpine-based Docker containers, and some stripped-down VPS base images where curl is not installed by default. The fix is a one-line package install.

Fix by Operating System

Ubuntu / Debian

sudo apt update && sudo apt install -y curl

Alpine Linux (Docker / containers)

apk add --no-cache curl

CentOS / AlmaLinux / RHEL

sudo dnf install -y curl
# CentOS 7:
sudo yum install -y curl

Arch Linux / Manjaro

sudo pacman -S curl

Fedora

sudo dnf install -y curl

Docker: curl Missing in Container

The most common place this error appears is inside Docker containers. Minimal base images (debian:slim, ubuntu:minimal, alpine:latest) do not include curl.

Fix in Dockerfile:

# Debian/Ubuntu based
FROM debian:12-slim
RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Alpine based
FROM alpine:3.19
RUN apk add --no-cache curl

Always install ca-certificates alongside curl on Debian/Ubuntu so HTTPS requests work correctly.

Verify the Install

curl --version
# curl 8.x.x (x86_64-pc-linux-gnu) libcurl/8.x.x ...

Test a basic request:

curl -I https://vmheaven.io
# Should return HTTP headers with status 200

wget as an Alternative

If installing curl is not an option, wget can substitute for most common use cases:

curl commandwget equivalent
curl -LO https://example.com/filewget https://example.com/file
curl -s https://example.comwget -qO- https://example.com
curl -X POST -d 'data' URLwget --post-data='data' URL

Common Error: curl Works But HTTPS Fails

If curl is installed but HTTPS requests fail with SSL certificate problem: unable to get local issuer certificate, you are missing CA certificates:

# Ubuntu/Debian
apt install -y ca-certificates
update-ca-certificates

# Alpine
apk add ca-certificates

Checking Why curl Is Missing (VPS)

On a fresh VMHeaven VPS running a minimal image, curl is typically pre-installed. If it is missing:

dpkg -l | grep curl
# or
rpm -qa | grep curl

If no package is listed, simply install it with the one-liner for your distro above.

curl: command not found — Fix for Ubuntu, Alpine & CentOS | VMHeaven Troubleshoot