PostgreSQL 10 on Linux - LC_COLLATE locale en_US.utf-8 not valid

前端 未结 4 1058
借酒劲吻你
借酒劲吻你 2021-01-05 06:55

ERROR: invalid locale name: \"en_US.utf-8\"

Running Ubuntu server 18.04 Beta 2 with PostgreSQL 10.

In running a database creatio

4条回答
  •  我在风中等你
    2021-01-05 07:26

    I had the same error, I generated the new locale:

    locale-gen en_US.UTF-8 
    

    I verified with locale -a that it was in fact present, then I logged out just to make sure, but I was still getting the same error on the database creation.

    Finally, I solved the error by simply restarting the postgresql server with:

    sudo systemctl restart postgresql
    

    After that, the database creation command was working!

提交回复
热议问题