You are not logged in.

#1 2015-10-10 17:05:43

Aegidius
Member
From: Italy
Registered: 2011-06-29
Posts: 288
Website

PostgreSQL initdb: invalid locale name "en_US.UTF-8"

Hello all,

I am following the wiki in order to install and run PostgreSQL but I am getting this error.

[postgres@archlinux ~]$ initdb --locale en_US.UTF-8 -E UTF8 -D '/var/lib/postgres/data'
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

initdb: invalid locale name "en_US.UTF-8"

Do you know why the locale name is not valid?

Offline

#2 2015-11-10 02:59:11

mencargo
Member
Registered: 2009-05-05
Posts: 58

Re: PostgreSQL initdb: invalid locale name "en_US.UTF-8"

I had the same problem.

Check that the correct LANG is set in /etc/locale.conf

cat /etc/locale.conf
LANG=en_US.UTF-8

Then do sudo locale-gen and try that again

Offline

#3 2015-11-10 04:24:50

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,461

Re: PostgreSQL initdb: invalid locale name "en_US.UTF-8"

Sounds like you don't have that locale generated. Check /etc/locale.gen, then run locale-gen as mencargo suggested.

Offline

#4 2017-04-12 12:51:04

jramirezg
Member
Registered: 2017-02-28
Posts: 2

Re: PostgreSQL initdb: invalid locale name "en_US.UTF-8"

Hell have the same problem I have KDE and Archlinux installed and postgresql gives me the same error, this forum trend is about 2 years old and I can't seem to find a solution for  this problem.
thanks for your help

Offline

#5 2017-04-12 12:52:33

jramirezg
Member
Registered: 2017-02-28
Posts: 2

Re: PostgreSQL initdb: invalid locale name "en_US.UTF-8"

[postgres@lockdurn data]$ initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data'
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

initdb: invalid locale name "en_US.UTF-8"

Offline

#6 2017-04-12 15:08:40

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,783
Website

Re: PostgreSQL initdb: invalid locale name "en_US.UTF-8"

So do as mencargo & Scimmia suggested. If you still have trouble, open a new thread. Be sure to share with us the content of /etc/locale.conf and output of locale-gen, using code tags.

https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

Board footer

Powered by FluxBB