So I want to set up Postgres on a Microsoft Azure-server running Ubuntu 14.04. I need to make a cluster:
user@mysystem:~$ pg_createcluster
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = "nb_NO.UTF-8",
LC_ADDRESS = "nb_NO.UTF-8",
LC_MONETARY = "nb_NO.UTF-8",
LC_NUMERIC = "nb_NO.UTF-8",
LC_TELEPHONE = "nb_NO.UTF-8",
LC_IDENTIFICATION = "nb_NO.UTF-8",
LC_MEASUREMENT = "nb_NO.UTF-8",
LC_TIME = "nb_NO.UTF-8",
LC_NAME = "nb_NO.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Error: The locale requested by the environment is invalid.
What I've tried:
- Adding
LANG=en_US.UTF-8
to/etc/environment
- Running
sudo locale-gen en_US.UTF-8
(and also with my own typeset, norwegian)
After much googling I've found this question and answer, which is the same situation as I have. The problem is that none of the suggestions in the accepted answer works for me, but I think that it may be that the problem pointed out with the typeset differing from my host and the Azure cloud-machine, may be the source of the problem. I haven't found anything to help me with this yet.
Note that the perl-warning comes with other Postgres-related commands too, including starting the Postgres-server or client-program.
All help is greatly appreciated. Thanks in advance!