Often those needing the latest version of packages will run non-LTS releases of a Linux distribution. This is not advised for production, but is frequently done for development. The versions shipped with the operating systems are the ones you can expect to receive any updates necessary from those that manage the distro, and any version you manually install will have it’s updates managed by you. Keep that in mind before proceeding, as the simplest solution would be to use the version included if it offers the functionality that you need.
With that in mind, if you would like to proceed, I found a couple of options stated here:
Now, I’m assuming you’re using Ubuntu. The steps can be different, depending on the chosen path (repo vs compiling source, for example) and the distro/version used.