【postgresql初始化失败】initdb: invalid locale settings; check LANG and LC_* environment variables
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.initdb: invalid locale settings; check LANG and LC_* environment variables
背景
在安装数据库成功之后,使用命令,对数据库进行初始化
service postgresql initdb
报错
Hint: the preferred way to do this is now "/usr/bin/postgresql-setup --initdb --unit postgresql"* Initializing database in '/var/lib/pgsql/data'
ERROR: Initializing database failed, possibly see /var/lib/pgsql/initdb_postgresql.log
[root@XX]# cat /var/lib/pgsql/initdb_postgresql.log
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.initdb: invalid locale settings; check LANG and LC_* environment variables
排查原因
原来是没有中文字符集
locale -a|grep zh
解决办法
yum install glibc-common
yum install -y langpacks-zh_CN
source /etc/locale.conf
结果
再次查看
locale -a|grep zh
就有中文字符集了。
重新初始化数据库。
成功
_____
2021-12-10 若上面的方法无法解决增加新的解决办法
【postgresql初始化失败】initdb: invalid locale settings; check LANG and LC_* environment variables(之二)_康雨城-CSDN博客
【postgresql初始化失败】initdb: invalid locale settings; check LANG and LC_* environment variables相关推荐
- 【postgresql初始化失败】initdb: invalid locale settings; check LANG and LC_* environment variables(之二)
背景 此前,曾写过一篇文章,解决描述的问题. [postgresql初始化失败]initdb: invalid locale settings: check LANG and LC_* environ ...
- 金仓数据库KingbaseES初始化失败如何分析
一.KingbaseES Initdb初始化数据库过程 initdb 创建一个新的KingbaseES数据库集群.一个数据库集群是由单个服务器实例管理的多个数据库的集合. 创建数据库系统包括创建数据库 ...
- MPU6050初始化失败 错误代码8
MPU6050是一款6轴(三轴加速度+三轴角速度)姿态传感器. 最近需要用到这款传感器,但在使用过程中发现模块DMP初始化总是失败,网上查资料有的说使模块坏了,也有的说是模块出厂漏焊了两个电容,但总觉 ...
- postgresql初始化数据库
postgresql初始化数据库 目录/var/lib/pgsql/data 创建pgsql的数据库: # mkdir -p /var/lib/pgsql/data 改变目录的所属用户 # cd /v ...
- 总结—什么妖引起的MongoDB副本集初始化失败?
前言: 在之前搭建MongoDB集群中,遇到过一些小问题作妖引起的初始化副本集失败,初学至今踩过来的坑,在此做个小结. 1.IP错误引起MongoDB副本集初始化失败 这个错误在另一篇文章已经描述过, ...
- eclipse链接mycat报数据源初始化失败
程序环境: maven + eclispe + mycat 1.6 + mysql5.6 程序启动的时候报数据源初始化失败,错误日志如下: 2018-03-16 17:41:23 [ERROR]-[c ...
- android audiorecord jni,Android AudioRecord初始化失败
我正在为Android创建应用程序,听电话.问题是初始化失败.Android AudioRecord初始化失败 我的日志: E/AudioRecord﹕ Could not get audio inp ...
- Invalid prop: type check failed for prop “total“. Expected Number with value x, got String with valu
一.问题 在做vue项目分页功能中,出现了Invalid prop: type check failed for prop "total". Expected Number wit ...
- ad用户文件服务器登录过程初始化失败,域用户无法登录域故障处理(AD问题).docx...
域用户无法登录域故障处理 问题) (AD 系统故障记录 故障记录日期:2010-01-14 主机名及 IP: FS03(192.168.2.246) 主机系统及应用:DC FileServer 系统状 ...
最新文章
- Windows设置软件开机自启动与关闭
- 设计模式之原型模式prototype
- 人机协同作战:或改写未来战争规则
- 在安装完成oracle的时候,需要su - oracle,但有时候出现ulimit pize...
- javascript this详解
- 计划策略 : 40 / 20 测试
- mac 查看指定端口情况 并杀死该进程
- bbb mmc_blk_probe 分析
- java调用ole ie_SWT中通过Automatioin的方式访问IE(升级版)
- php xml视频教程,传智播客PHP2015-XML视频教程
- centos 7 之nginx
- Ant in Action读书笔记(一):Ant里的Property是immutable的
- Message Queue
- 使用opencv测量点到线的距离
- L44. 通配符匹配
- 跟我一起学MiniOA:第一章 1.4 Richfaces控件(连载)
- LCD1602液晶显示模块
- Mac下安装Homebrew
- 【大学物理·恒定电流的磁场】恒定电流
- idata 单片机 新唐_请教新唐单片机N76E003内存空间不足的问题
热门文章
- C语言 memset()函数(内存初始化函数)
- python 解决conda的environment未被激活解决方案
- 初学__Python——Python代码的组织形式
- 下载并配置完dex-net,在CLI中执行相应操作命令报错解决
- canal应用四:canal-adapter的使用
- JVM PrintGCDetails打印GC细节
- 文件操作工具类FileUtil
- Spring AOP(一) AOP基本概念
- 服务器监控工具_系统管理员不可错过的 6 款服务器监控工具
- python简单词频统计_python简单词频统计