【发布时间】:2018-04-04 10:49:10
【问题描述】:
每当我尝试运行下面的命令时,它总是在 RHEL7 上失败。我在另一个类似的操作系统(较新)上尝试过,但它不这样做,只是工作。
我查看了目录的权限,禁用了 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"
【问题讨论】:
-
可以在 /usr/lib/locale' 目录下创建符号链接(或复制);或者可以使用
initdb --locale=LOCALE覆盖您的区域设置。您也可以使用--no-locale或--locale=C使系统不做任何假设。
标签: postgresql rhel rhel7 postgresql-9.6