重庆思庄Oracle、Redhat认证学习论坛
标题:
pg修改 lc_messages为 zh_CN.utf-8报错无效值
[打印本页]
作者:
郑全
时间:
2024-8-25 17:45
标题:
pg修改 lc_messages为 zh_CN.utf-8报错无效值
如题,我们修改LC_MESSAGES时,直接报错:
postgres=# set lc_messages='zh_CN.UTF-8';
ERROR: invalid value for parameter "lc_messages": "zh_CN.UTF-8"
postgres=#
原因是不认识 zh_CN,需要安装语言包: langpacks-zh_CN
yum install langpacks-zh_CN 后,再去修改,就可以了。
postgres=# set lc_messages='zh_CN.UTF-8';
SET
postgres=#
附
安装 langpacks-zh_CN 过程:
[root@pgce01 ~]# yum install langpacks-zh_CN
Last metadata expiration check: 1:02:38 ago on Sun 25 Aug 2024 09:11:32 AM CST.
Dependencies resolved.
=====================================================================================================================================================================================================================================
Package Architecture Version Repository Size
=====================================================================================================================================================================================================================================
Installing:
langpacks-zh_CN noarch 3.0-16.el9 ol9_appstream 11 k
Installing dependencies:
google-noto-cjk-fonts-common noarch 20230817-2.el9 ol9_appstream 11 k
google-noto-sans-cjk-ttc-fonts noarch 20230817-2.el9 ol9_appstream 81 M
langpacks-core-font-zh_CN noarch 3.0-16.el9 ol9_appstream 11 k
langpacks-core-zh_CN noarch 3.0-16.el9 ol9_appstream 11 k
Installing weak dependencies:
glibc-langpack-zh x86_64 2.34-100.0.1.el9 ol9_baseos_latest 2.3 M
google-noto-serif-cjk-ttc-fonts noarch 20230817-2.el9 ol9_appstream 116 M
Transaction Summary
=====================================================================================================================================================================================================================================
Install 7 Packages
Total download size: 199 M
Installed size: 313 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): google-noto-cjk-fonts-common-20230817-2.el9.noarch.rpm 3.5 kB/s | 11 kB 00:03
(2/7): glibc-langpack-zh-2.34-100.0.1.el9.x86_64.rpm 299 kB/s | 2.3 MB 00:07 (3/7): langpacks-core-font-zh_CN-3.0-16.el9.noarch.rpm 17 kB/s | 11 kB 00:00
(4/7): langpacks-core-zh_CN-3.0-16.el9.noarch.rpm 2.9 kB/s | 11 kB 00:03
(5/7): langpacks-zh_CN-3.0-16.el9.noarch.rpm 48 kB/s | 11 kB 00:00
(6/7): google-noto-sans-cjk-ttc-fonts-20230817-2.el9.noarch.rpm 2.6 MB/s | 81 MB 00:30
(7/7): google-noto-serif-cjk-ttc-fonts-20230817-2.el9.noarch.rpm 3.6 MB/s | 116 MB 00:31
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 5.7 MB/s | 199 MB 00:34
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : google-noto-cjk-fonts-common-20230817-2.el9.noarch 1/7
Installing : google-noto-sans-cjk-ttc-fonts-20230817-2.el9.noarch 2/7
Installing : langpacks-core-font-zh_CN-3.0-16.el9.noarch 3/7
Installing : google-noto-serif-cjk-ttc-fonts-20230817-2.el9.noarch 4/7
Installing : glibc-langpack-zh-2.34-100.0.1.el9.x86_64 5/7
Installing : langpacks-core-zh_CN-3.0-16.el9.noarch 6/7
Installing : langpacks-zh_CN-3.0-16.el9.noarch 7/7
Running scriptlet: langpacks-zh_CN-3.0-16.el9.noarch 7/7
Verifying : glibc-langpack-zh-2.34-100.0.1.el9.x86_64 1/7
Verifying : google-noto-cjk-fonts-common-20230817-2.el9.noarch 2/7
Verifying : google-noto-sans-cjk-ttc-fonts-20230817-2.el9.noarch 3/7
Verifying : google-noto-serif-cjk-ttc-fonts-20230817-2.el9.noarch 4/7
Verifying : langpacks-core-font-zh_CN-3.0-16.el9.noarch 5/7
Verifying : langpacks-core-zh_CN-3.0-16.el9.noarch 6/7
Verifying : langpacks-zh_CN-3.0-16.el9.noarch 7/7
Installed:
glibc-langpack-zh-2.34-100.0.1.el9.x86_64 google-noto-cjk-fonts-common-20230817-2.el9.noarch google-noto-sans-cjk-ttc-fonts-20230817-2.el9.noarch
google-noto-serif-cjk-ttc-fonts-20230817-2.el9.noarch langpacks-core-font-zh_CN-3.0-16.el9.noarch langpacks-core-zh_CN-3.0-16.el9.noarch
langpacks-zh_CN-3.0-16.el9.noarch
Complete!
[root@pgce01 ~]#
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/)
Powered by Discuz! X3.2