postgres15初始数据库出现initdb: could not find suitable text search configuration for locale "zh_CN.UTF-8"

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
eremiter
帖子: 75
注册时间: 2017-04-22 19:12
系统: Ubuntu22

postgres15初始数据库出现initdb: could not find suitable text search configuration for locale "zh_CN.UTF-8"

#1

帖子 eremiter » 2022-10-30 14:35

环境:ubuntu22.04 ,不知会有什么影响

postgres@servers:/usr/local/pgsql$ initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "zh_CN.UTF-8".
The default database encoding has accordingly been set to "UTF8".
initdb: could not find suitable text search configuration for locale "zh_CN.UTF-8"
The default text search configuration will be set to "simple".

Data page checksums are disabled.

fixing permissions on existing directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Asia/Shanghai
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

pg_ctl -D /usr/local/pgsql/data -l logfile start

postgres@servers:/usr/local/pgsql$
postgres@servers:/usr/local/pgsql$ locale
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:zh:en_US:en
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC=zh_CN.UTF-8
LC_TIME=zh_CN.UTF-8
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY=zh_CN.UTF-8
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER=zh_CN.UTF-8
LC_NAME=zh_CN.UTF-8
LC_ADDRESS=zh_CN.UTF-8
LC_TELEPHONE=zh_CN.UTF-8
LC_MEASUREMENT=zh_CN.UTF-8
LC_IDENTIFICATION=zh_CN.UTF-8
LC_ALL=
===========================

locale: zh_CN.utf8 archive: /usr/lib/locale/locale-archive
-------------------------------------------------------------------------------
title | Chinese locale for Peoples Republic of China
email | bug-glibc-locales@gnu.org
language | Chinese
territory | China
revision | 0.1
date | 2000-07-25
codeset | UTF-8

locale: zh_SG.utf8 archive: /usr/lib/locale/locale-archive

-------------------------------------------------------------------------------
title | Chinese language locale for Singapore
source | IBM Globalization Center of Competency, Yamato Software Laboratory
address | 1623-14, Shimotsuruma, Yamato-shi, Kanagawa-ken, 242-8502, Japan
email | bug-glibc-locales@gnu.org
language | Chinese
territory | Singapore
revision | 1.0
date | 2000,October,27 (XML source:2000,July,20)
codeset | UTF-8

locale: C.utf8 directory: /usr/lib/locale/C.utf8
-------------------------------------------------------------------------------
title | C locale
email | bug-glibc-locales@gnu.org
revision | 2.1
date | 2022-01-30
codeset | UTF-8
上次由 eremiter 在 2022-10-30 14:51,总共编辑 1 次。
回复