Package 'docker-compose' has no installation candidate

When I try install docker-compose to my linux machines it’s saying like.

sudo apt install docker.io docker-compose
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Package docker-compose is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘docker-compose’ has no installation candidate

Not surprising. docker-compose was compose v1, discontinued and I don’t remember if it was installable from apt repositories. I installed with pip, but docker.io is not the official Docker CE either. Here is the official guide for each platform

Always start with the official documentations!

Dear, I am using Kali Linux, I have try with as your mentioned document through but still same error .

i follow the document link: Install the Compose plugin | Docker Docs

Since Kali Linux is not among the supported operating systems, you may want to ask a Kali community. It seems they indeed recommend docker.io as well, but also Docker CE: Installing Docker on Kali Linux | Kali Linux Documentation

So you can install docker-compose-plugin which is Compose v2. On a supported operating System I never recommend docker.io, but I can’t talk about Kali. To use Docker CE, you will need to add the repository as described in the Kali documentation.