There are binary installer for pandoc available for Windows and MacOS, as well as a debian package, available for the latest release. There are usually not up-to-date versions of pandoc in "Debian, Ubuntu, Slackware, Arch, Fedora, NiXOS, openSUSE, and gentoo" repositories.
A reliable way ...