繁体   English   中英

Docker 无法在 Centos 8 上构建 PostgreSQL 12

[英]Docker fails to build PostgreSQL 12 on Centos 8

在 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 那些对我不起作用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM