How to fix "Error: the locale requested by the environment is invalid" during postgresql cluster upgrade (pg_upgradecluster)
had the same problem on an ubuntu 16.04 server. what helped in my case was to generate all the locales that appear in your listing of $ locale
:
$ sudo locale-gen "en_US.UTF-8"
$ sudo locale-gen "nl_NL.UTF-8"
good luck!