2017-10-23 35 views
1

私は以下のコマンドを実行するたびにRHEL7で常に失敗します。私は別の同様のOS(Newer)で試してみましたが、これはやっておらず、うまく動作します。Postgresql 9.6 InitDBが失敗する

ディレクトリのパーミッションを調べ、selinuxを無効にして、ロケールを調べましたが、これらの設定は他のサーバーの設定と一致します。

/usr/pgsql-9.6/bin/postgresql96-setup initdb 

ログ出力:

The database cluster will be initialized with locale "en_US.UTF-8". 
The default database encoding has accordingly been set to "UTF8". 
The default text search configuration will be set to "english". 

Data page checksums are disabled. 

fixing permissions on existing directory /var/lib/pgsql/9.6/data ... ok 
creating subdirectories ... ok 
selecting default max_connections ... 100 
selecting default shared_buffers ... 64MB 
selecting dynamic shared memory implementation ... posix 
creating configuration files ... ok 
running bootstrap script ... < 2017-10-23 20:13:54.035 BST > LOG: invalid value for parameter "lc_messages": "en_US.UTF-8" 
< 2017-10-23 20:13:54.035 BST > LOG: invalid value for parameter "lc_monetary": "en_US.UTF-8" 
< 2017-10-23 20:13:54.035 BST > LOG: invalid value for parameter "lc_numeric": "en_US.UTF-8" 
< 2017-10-23 20:13:54.035 BST > LOG: invalid value for parameter "lc_time": "en_US.UTF-8" 
< 2017-10-23 20:13:54.035 BST > FATAL: configuration file "/var/lib/pgsql/9.6/data/postgresql.conf" contains errors 
child process exited with exit code 1 
initdb: removing contents of data directory "/var/lib/pgsql/9.6/data" 
+0

/usr/lib/locale 'ディレクトリにシンボリックリンク(またはコピー)を作成できます。 'initdb --locale = LOCALE'を使ってあなたのロケール設定を上書きすることができます。 '--no-locale'や' --locale = C'を使って、システムに何も仮定させないようにすることもできます。 – joop

答えて

0

システムが有効とen_US.UTF-8ロケールを認識していないようです。

インストールされているロケールを最小限に抑えるための手順を適用しましたか? /usr/lib/locale/locale-archiveファイルのサイズはどのくらいですか? 100 MiB程度にする必要があります。新しくインストールしたものと比較することもできます(rpm -Vはこのファイルでは機能しません)。

+0

ディレクトリは102Mです。私はまた、setupコマンドを使わずにinitdbコマンドを使ってen_GB.UTF-8を試しました。 –

関連する問題