gpt4 book ai didi

postgresql - Docker无法在Centos 8上构建PostgreSQL 12

转载 作者:行者123 更新时间:2023-12-02 19:16:34 25 4
gpt4 key购买 nike

在Centos 8上安装PostgreSQL 12失败,并出现以下情况:

initdb: error: invalid locale settings; check LANG and LC_* environment variables
pg_ctl: directory "/postgres/pgdata" does not exist
psql: error: could not connect to server: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
pg_ctl: directory "/postgres/pgdata" does not exist
/tracks-bin/initPostgres.sh: line 12: /postgres/pgdata/postgresql.conf: No such file or directory
/tracks-bin/initPostgres.sh: line 13: /postgres/pgdata/pg_hba.conf: No such file or directory
pg_ctl: directory "/postgres/pgdata" does not exist
psql: error: could not connect to server: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
psql: error: could not connect to server: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

最佳答案

添加glibc-langpack-en解决了该问题。在Dockerfile中:RUN yum install -y glibc-langpack-en我尝试了其他有关向命令添加不同的语言环境设置的建议,例如:initdb -E UTF8 --locale=en_US.utf8RUN localedef -i en_US -f UTF-8 en_US.UTF-8。这些对我没有用。

关于postgresql - Docker无法在Centos 8上构建PostgreSQL 12,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63245472/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com