I know Mint/Ubuntu is not officially supported, but...
I had no trouble installing pihole on Mint 18 and upgrading to 5.0 on Mint 18. Then I upgraded to Mint 20. pihole 5.0 works fine but when I try to upgrade to 5.1 I get the OS_UNSUPPORTED error and setting the environment variable doesn't help. Attached is my debug log (upload/token didn't work).
I mentioned "setting the environment variable doesn't help". I should have been more explicit. The result of doing so has no effect -- it still tells me that OS not supported.