Thread: initdb: pg_encoding failed

initdb: pg_encoding failed

From
"[Bad-Knees]"
Date:
Hi.
I have a problem getting postgresql to work on my Debian 2.2 system, and
i hope someone in this group can help me.

I have successfully compiled, installed and used postgresql 7.02 on a
RedHat6.2 system.

The problem is the same for postgresql 7.02 and 7.03 on two different
computers, both running Debian 2.2, so think its either the distro or
me(most likly me, but i cant figure out what i'm doing wrong)!

What i wrote on all 4 tries:

./configure --enable-locale --enable-multibyte --with-odbc
make
make install

and everything seemed to go smooth.

The next thing i tried was:
/usr/local/pgsql/bin/initdb -D /var/pgsql/data
then i got this error:
---
initdb: pg_encoding failed

Perhaps you did not configure PostgreSQL for multibyte support or
the program was not successfully installed.
--

any suggestions???

Thanks

[Bad-Knees]

Re: initdb: pg_encoding failed

From
"Oliver Elphick"
Date:
"[Bad-Knees]" wrote:
  >Hi.
  >I have a problem getting postgresql to work on my Debian 2.2 system, and
  >i hope someone in this group can help me.
 ...
  >What i wrote on all 4 tries:
  >
  >./configure --enable-locale --enable-multibyte --with-odbc
  >make
  >make install
  >
  >and everything seemed to go smooth.
  >
  >The next thing i tried was:
  >/usr/local/pgsql/bin/initdb -D /var/pgsql/data
  >then i got this error:
  >---
  >initdb: pg_encoding failed

Since you are trying to build your own PostgreSQL, rather than installing
Debian packages, please make sure that all Debian PostgreSQL-related
packages are removed.  It seems possible that you may be loading the
libpq.so.2 library if you have libpgsql2 or libpgsql2.1 installed and this
may be causing problems.

initdb is a script, so you can add "set -x" at the top of it to trace what
it is doing.  Then you can examine the failing command in more detail.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "For the Lord himself shall descend from heaven with a
      shout, with the voice of the archangel, and with the
      trump of God; and the dead in Christ shall rise first;
      Then we which are alive and remain shall be caught up
      together with them in the clouds, to meet the Lord in
      the air; and so shall we ever be with the Lord."
                          I Thessalonians 4:16,17