Sample Header Ad - 728x90

Ubuntu - PostegreSQL displays errors in foreign language even after changing all locales to en_US and reinstalling it

0 votes
0 answers
54 views
I inherited a Ubuntu desktop from another employee and installed PostgreSQL with the help of the official guide .
abc@lenovo:~$ sudo apt install postgresql-15
I had not known that I had to setup an account first so when I tried to create a database I got an error. I now know how to create a user and that is not the question.
abc@lenovo:~$ createdb
createdb: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: 치명적오류:  "abc" 롤(role) 없음
Notice how a small portion of the error is in a foreign language. To ensure everything is in English going forward, I edited all locales listed in
/etc/default/locale
to be
.UTF-8
.
abc@lenovo:~$ sudo vim /etc/default/locale
abc@lenovo:~$ cat /etc/default/locale
LANG=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LANGUAGE=en
Then I rebooted my system. However the message that
generates still contained foreign language. Assuming that it simply did not apply the locale changes, I uninstalled then reinstalled the package.
abc@lenovo:~$ sudo apt remove postgresql-15
abc@lenovo:~$ sudo apt install postgresql-15
Then I checked
's own settings.
abc@lenovo:~$ grep lc_ /etc/postgresql/15/main/postgresql.conf
lc_messages = 'en_US.UTF-8'			# locale for system error message
lc_monetary = 'en_US.UTF-8'			# locale for monetary formatting
lc_numeric = 'en_US.UTF-8'			# locale for number formatting
lc_time = 'en_US.UTF-8'				# locale for time formatting
It correctly inherited the new default locale settings from the system. However the error message had not changed a bit.
abc@lenovo:~$ createdb
createdb: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: 치명적오류:  "abc" 롤(role) 없음
Did I miss a locale setting? Do I need to manually wipe some cache stored deep inside? Why is the error message nevertheless mixed?
Asked by qc033 (1 rep)
Jul 29, 2023, 05:50 PM
Last activity: Jul 29, 2023, 05:50 PM