Thursday, December 15, 2011

Postgresql Troubleshooting - FATAL: valor no válido para el parámetro «lc_messages»: «en_US.UTF-8»

Source machine: opensuse 12.1 en_US.UTF8
Target machine: debian squezze es_MX.utf8

This issue arose when trying to start a database cluster (inside a machine configured in spanish) based on a copy of a cluster in another machine that is configured with the english language.

The problem was that the only "locales" installed in the target machine were:

postgres@debian1:~$ locale -a
C
es_MX.utf8
POSIX

In Debian, there are several ways to configure a new locale:
http://people.debian.org/~schultmc/locales.html

I followed successfully the easy way:

The Easy Way


Install debconf (i.e. run apt-get update then apt-get install debconf, as root)
Run dpkg-reconfigure locales as root

And now,I list the locales again:

postgres@debian1:~$ locale -a
C
en_US.utf8
es_MX.utf8
POSIX

No comments:

Post a Comment