PostgreSQL: initdb fails with: 'FATAL: could not access file "$libdir/euc_kr_and_mic": No such file or directory I have installed postgis-bundle-pg96x64-2.3.1-1 on my Windows workstation. I'm trying to create a database but initdb fails with 


  "FATAL:  could not access file "$libdir/euc_kr_and_mic": No such file or directory" 


Any idea why this is happening? 

I have uninstalled and installed the package just in case, and rebooted the machine... 

Here is the full log:

$ initdb -D PGDATA -E utf8 --no-locale -U $PGUSER
The files belonging to this database system will be owned by user "PKuchta".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory PGDATA ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... windows
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... FATAL:  could not access file 
"$libdir/euc_kr_and_mic": No such file or directory
STATEMENT:  -- EUC_KR --&gt; MULE_INTERNAL
        CREATE OR REPLACE FUNCTION euc_kr_to_mic (INTEGER, INTEGER, CSTRING, 
INTERNAL, INTEGER) RETURNS VOID AS '$libdir/euc_kr_and_mic', 'euc_kr_to_mic' 
LANGUAGE C STRICT;
        COMMENT ON FUNCTION euc_kr_to_mic(INTEGER, INTEGER, CSTRING, 
INTERNAL, INTEGER) IS 'internal conversion function for EUC_KR to 
MULE_INTERNAL';
        CREATE DEFAULT CONVERSION pg_catalog.euc_kr_to_mic FOR 'EUC_KR' TO 
'MULE_INTERNAL' FROM euc_kr_to_mic;
        COMMENT ON CONVERSION pg_catalog.euc_kr_to_mic IS 'conversion for 
EUC_KR to MULE_INTERNAL';

child process exited with exit code 1
initdb: removing data directory "PGDATA"
It turned out the problem was caused by leftovers from another PostgreSQL installation. After removing that the problem was solved.