title: Cannot install Docker Compose v2: "Invalid Plugin, exec format error"
body: <p>I installed the new <code>docker compose</code> CLI according to the instructions on <a href="https://docs.docker.com/compose/cli-command/#install-on-linux" rel="nofollow noreferrer">docs.docker.com</a> (Ubuntu 20.04) and cannot use the plugin.</p>
  <p>The command <code>docker compose help</code> shows:</p>
  <pre><code>$ docker compose help
  docker: 'compose' is not a docker command.
  See 'docker --help' 
  </code></pre>
  <p>When running <code>docker help</code>, I get:</p>
  <pre><code>$ docker help
  
  Usage:  docker [OPTIONS] COMMAND
  
  [[ OMMITTED NORMAL OUTPUT ]]
  
  Invalid Plugins:
    compose     failed to fetch metadata: fork/exec /home/myname/.docker/cli-plugins/docker-compose: exec format error
  
  Run 'docker COMMAND --help' for more information on a command.
  
  To get more help with docker, check out our guides at https://docs.docker.com/go/guides/
  </code></pre>
  <p>Same when installing under <code>/usr/local/lib/docker/cli-plugins</code> and running the command as root.</p>
  <p>I currently use <code>docker</code> version 20.10.7 and <code>docker-compose</code> version 1.28.0.</p>
  <p>What am I doing wrong? How to get the new <code>compose</code> to work?</p>