It's very complicated to get latest version, developers support only one Linux: Arch Linux. It's supposed to be compiled in Go, but resolving dependencies take whole day. You must use at least version 1.0.0 (added support for protocol ACME v2). You can install package with version 3.2 in Ubuntu 20.04.
I've compiled lego from sources and saved it on all my personal servers. There's one good thing in Go - it builds static binaries, so you can compile on one Linux server and just copy to any other Linux.
Lego supports HTTP, TLS and DNS ACME challenges.