簡體   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