I hope this will help someone,
Context: I wanted to use memcache
like this:
$memcache = new \Memcache();
but composer suggests me to install the extension
"ext-memcache": "*",
but that one didn't want to work, so I installed
sudo apt install php7.4-memcache
sudo apt install php7.4-memcached
and all worked