【问题标题】:Docker fails to build PostgreSQL 12 on Centos 8Docker 无法在 Centos 8 上构建 PostgreSQL 12
【发布时间】:2020-11-24 11:11:55
【问题描述】:

在 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"?

【问题讨论】:

    标签: postgresql docker centos8


    【解决方案1】:

    添加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。这些对我不起作用。

    【讨论】:

      猜你喜欢
      • 2021-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-06
      • 1970-01-01
      • 1970-01-01
      • 2020-11-07
      • 1970-01-01
      相关资源
      最近更新 更多