⭐ Summary
Why am I seeing “Unable to locate package docker-compose-plugin” when I try to start a Docker container?
Because the Docker repository is not added on your system.
Ubuntu/Debian’s default repos do not contain this package. Add Docker’s official repo, update apt, and the install will work.
✅ Fix: Add Docker’s Official Repository (Required)
Run these exact commands in order:
1. Update apt + install prerequisites:
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg
2. Add Docker’s GPG key:
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
| sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
3. Add the Docker repository:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
4. Update apt again + install the plugin:
sudo apt-get update
sudo apt-get install -y docker-compose-plugin
5. Verify:
docker compose version
🧠 Why this happens
The package only exists in Docker’s own repo, not Ubuntu/Debian’s defaults. If that repo isn’t added, apt simply can’t find it.
Comments
Post a Comment
Tell me what you think and be honest with me.....I got 2 know...... ✌️🤗😁