initdb.bin: invalid locale settings; check LANG and LC_* environment variables

£可爱£侵袭症+ 提交于 2019-12-10 14:51:50

问题


When I tried to install bitnami odoo 9 in my ubuntu system via terminal, I got the following error message.

How to solve this issue?

initdb.bin: invalid locale settings; check LANG and LC_* environment variables

Thanks in advance!


回答1:


The issue solved when i used the following commands

LC_ALL="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"



回答2:


On the docker image I was using every single locale was commented out in the /etc/locale.gen file. Meaning no locale was setup, which was causing this error.

Because I was scripting the build I ran the following two commands to fix the problem (you may want to manually edit /etc/locale.gen, if you want to avoid my nuclear option of overwriting the whole file)

echo en_US.UTF-8 UTF-8 > /etc/locale.gen
locale-gen en_US.UTF-8



回答3:


For me it is part of using ssh

So edit sshd config file

/etc/ssh/sshd_config

and change LANG part it to this:

AcceptEnv LANG en_US.UTF-8

then restart ssh and reconnect

sudo service sshd restart



回答4:


On Ubuntu Ubuntu 19.04 (Disco Dingo) I had to set all these.

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales

The full doc is here.



来源:https://stackoverflow.com/questions/41956994/initdb-bin-invalid-locale-settings-check-lang-and-lc-environment-variables

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!