Debian Linux系统出现语言环境报错时的解决

-bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (zh_CN.UTF-8): No su ch file or directory
-bash: warning: setlocale: LC_MESSAGES: cannot change locale (zh_CN.UTF-8): No s uch file or directory
-bash: warning: setlocale: LC_NUMERIC: cannot change locale (zh_CN.UTF-8): No su ch file or directory
-bash: warning: setlocale: LC_TIME: cannot change locale (zh_CN.UTF-8): No such file or directory

# localedef -c -f UTF-8 -i zh_CN zh_CN.utf8

Gentoo make.conf

Gentoo我的/etc/portage/make.conf配置文档

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
COMMON_FLAGS="-march=native -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C

MAKEOPTS="-j13"

USE="X"
USE="acl alsa qt5 qt4  kde  dvd pulseaudio h264"
USE="dbus policykit udisk eudev consolekit"
USE="handbook"
USE="elogind"
USE="vboxwebsrv"
INPUT_DEVICES="libinput synaptics"
#intel i965
USE="glamor dri sna uxa xvmc"
VIDEO_CARDS="nvidia intel i965 virtualbox"

GENTOO_MIRRORS="http://gentoo.c3sl.ufpr.br/ https://mirrors.tuna.tsinghua.edu.cn/gentoo http://gentoo.aditsu.net:8000/"