1 |
Hi to all, |
2 |
|
3 |
I'm setting up a new server for developing database-based applications. |
4 |
|
5 |
So, I emerged PostgreSQL, but the problem comes when I try to |
6 |
configure Postgre, this is what I get: |
7 |
|
8 |
--------------------------------------------------------- |
9 |
# emerge postgresql --config |
10 |
|
11 |
|
12 |
Configuring pkg... |
13 |
|
14 |
* Creating the data directory ... |
15 |
* Initializing the database ... |
16 |
The files belonging to this database system will be owned by user "postgres". |
17 |
This user must also own the server process. |
18 |
|
19 |
The database cluster will be initialized with locale C. |
20 |
|
21 |
fixing permissions on existing directory /var/lib/postgresql/data ... ok |
22 |
creating directory /var/lib/postgresql/data/global ... ok |
23 |
creating directory /var/lib/postgresql/data/pg_xlog ... ok |
24 |
creating directory /var/lib/postgresql/data/pg_xlog/archive_status ... ok |
25 |
creating directory /var/lib/postgresql/data/pg_clog ... ok |
26 |
creating directory /var/lib/postgresql/data/pg_subtrans ... ok |
27 |
creating directory /var/lib/postgresql/data/base ... ok |
28 |
creating directory /var/lib/postgresql/data/base/1 ... ok |
29 |
creating directory /var/lib/postgresql/data/pg_tblspc ... ok |
30 |
selecting default max_connections ... 10 |
31 |
selecting default shared_buffers ... 50 |
32 |
creating configuration files ... ok |
33 |
creating template1 database in /var/lib/postgresql/data/base/1 ... |
34 |
FATAL: XX000: failed to initialize lc_messages to "" |
35 |
LOCATION: InitializeGUCOptions, guc.c:2403 |
36 |
child process exited with exit code 1 |
37 |
initdb: removing contents of data directory "/var/lib/postgresql/data" |
38 |
* |
39 |
* You can use the '//etc/init.d/postgresql' script to run PostgreSQL |
40 |
instead of 'pg_ctl'. |
41 |
* |
42 |
--------------------------------------------------------- |
43 |
|
44 |
|
45 |
I did some google research and found two possible solutions, neither |
46 |
of those two worked for me. |
47 |
|
48 |
The first one [1] said that the solution is to compile glibc with nls. |
49 |
But, apparently, I already have glibc installed with nls. |
50 |
|
51 |
|
52 |
--------------------------------------------------------- |
53 |
# emerge -va glibc |
54 |
|
55 |
These are the packages that would be merged, in order: |
56 |
|
57 |
Calculating dependencies... done! |
58 |
[ebuild R ] sys-libs/glibc-2.6.1 USE="gd nls -debug -glibc-omitfp |
59 |
(-hardened) (-multilib) -profile (-selinux) -vanilla" 0 kB |
60 |
|
61 |
Total: 1 package (1 reinstall), Size of downloads: 0 kB |
62 |
|
63 |
Would you like to merge these packages? [Yes/No] |
64 |
|
65 |
--------------------------------------------------------- |
66 |
|
67 |
The second solution [2] that I found consists on editing the |
68 |
/etc/env.d/02locale file with UTF-8, like this (this is my actual |
69 |
02locale file): |
70 |
|
71 |
---------------------------/etc/env.d/02locale------------------------------ |
72 |
|
73 |
LANG="es_ES@euro" |
74 |
|
75 |
LC_CTYPE="es_ES.UTF-8" |
76 |
LC_NUMERIC="es_ES.UTF-8" |
77 |
LC_TIME="es_ES.UTF-8" |
78 |
LC_COLLATE="es_ES.UTF-8" |
79 |
LC_MONETARY="es_ES.UTF-8" |
80 |
LC_MESSAGES="es_ES.UTF-8" |
81 |
LC_PAPER="es_ES.UTF-8" |
82 |
LC_NAME="es_ES.UTF-8" |
83 |
LC_ADDRESS="es_ES.UTF-8" |
84 |
LC_TELEPHONE="es_ES.UTF-8" |
85 |
LC_MEASUREMENT="es_ES.UTF-8" |
86 |
LC_IDENTIFICATION="es_ES.UTF-8" |
87 |
LC_ALL="es_ES.UTF-8" |
88 |
|
89 |
------------------------------------------------------------------------------------- |
90 |
|
91 |
Still the same error. |
92 |
|
93 |
I hope someone helps me to fix this, ask me if you need to see any |
94 |
other of my configuration files. |
95 |
|
96 |
Thanks in advance! |
97 |
|
98 |
Richard. |
99 |
|
100 |
|
101 |
|
102 |
[1] http://forums.gentoo.org/viewtopic-p-1950119-highlight-fatal+xx000+initialize+lcmessages.html?sid=d01013a2790fc89ff6ebb6df84010702#1950119 |
103 |
|
104 |
[2] http://forum.soft32.com/linux/gentoo-postgres-postinstall-problem-ftopict334580.html |