Hi to all,

I'm setting up a new server for developing database-based applications.

So, I emerged PostgreSQL, but the problem comes when I try to
configure Postgre, this is what I get:

---------------------------------------------------------
# emerge postgresql --config


Configuring pkg...

 * Creating the data directory ...
 * Initializing the database ...
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating directory /var/lib/postgresql/data/global ... ok
creating directory /var/lib/postgresql/data/pg_xlog ... ok
creating directory /var/lib/postgresql/data/pg_xlog/archive_status ... ok
creating directory /var/lib/postgresql/data/pg_clog ... ok
creating directory /var/lib/postgresql/data/pg_subtrans ... ok
creating directory /var/lib/postgresql/data/base ... ok
creating directory /var/lib/postgresql/data/base/1 ... ok
creating directory /var/lib/postgresql/data/pg_tblspc ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 50
creating configuration files ... ok
creating template1 database in /var/lib/postgresql/data/base/1 ...
FATAL:  XX000: failed to initialize lc_messages to ""
LOCATION:  InitializeGUCOptions, guc.c:2403
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
 *
 * You can use the '//etc/init.d/postgresql' script to run PostgreSQL
instead of 'pg_ctl'.
 *
---------------------------------------------------------


I did some google research and found two possible solutions, neither
of those two worked for me.

The first one [1] said that the solution is to compile glibc with nls.
But, apparently, I already have glibc installed with nls.


---------------------------------------------------------
# emerge -va glibc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-libs/glibc-2.6.1  USE="gd nls -debug -glibc-omitfp
(-hardened) (-multilib) -profile (-selinux) -vanilla" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No]

---------------------------------------------------------

The second solution [2] that I found consists on editing the
/etc/env.d/02locale file with UTF-8, like this (this is my actual
02locale file):

---------------------------/etc/env.d/02locale------------------------------

LANG="es...@euro"

LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL="es_ES.UTF-8"

-------------------------------------------------------------------------------------

Still the same error.

I hope someone helps me to fix this, ask me if you need to see any
other of my configuration files.

Thanks in advance!

Richard.



[1] 
http://forums.gentoo.org/viewtopic-p-1950119-highlight-fatal+xx000+initialize+lcmessages.html?sid=d01013a2790fc89ff6ebb6df84010702#1950119

[2] 
http://forum.soft32.com/linux/gentoo-postgres-postinstall-problem-ftopict334580.html

Reply via email to