【发布时间】:2021-06-17 09:12:50
【问题描述】:
当我输入gitlab-ctl reconfigure时,它显示:
gitlab-ctl reconfigure it shows DETAIL:
The database was initialized with LC_COLLATE "zh_CN.UTF-8",
which is not recognized by setlocale().
系统是centos7:怎么解决这个问题?
.bashrc 的内容
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
以及个人资料的内容
unset i
unset -f pathmunge
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib64
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.252.b09-2.el7_8.x86_64/jre/bin/java
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
export M2_HOME=/usr/local/maven3
export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
export PATH=$PATH:/usr/local/gcc-linaro-4.9-2016.02-x86_64_arm-linux-gnueabihf/bin
export PATH=$PATH:/usr/local/mysql/bin
我也试过安装postgresql,登录后显示如下。
[root@0c-5b-8f-27-9a-64 ~]# su - postgres
Last login: Tue Jun 22 14:30:01 CST 2021 on pts/0
-bash: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8): Permission denied
-bash: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8)
-bash: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8)
-bash: export: `=': not a valid identifier
-bash: export: `en_US.UTF-8': not a valid identifier
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8)
-bash: warning: setlocale: LC_ALL: cannot change locale (zh_CN.UTF-8)
-bash: export: `=': not a valid identifier
-bash: export: `en_US.UTF-8': not a valid identifier
【问题讨论】: