Instead of recompiling nginx with fastcgi_cache_purge or installing a custom build of it, there is a libnginx-mod-http-cache-purge package available in the universe repo, completely hassle-free - https://www.ubuntuupdates.org/package/core/lunar/universe/base/libnginx-mod-http-cache-purge
This guide (and related) should be updated to encourage installing the module instead :)