perl: warning: Setting locale failed

Ubuntu 16.04 安装软件时提示:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "zh_CN.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").

因为安装软件时,都会去执行update-locale的命令,用来更新locale。
这个命令是一个perl脚本,由于系统没有安装zh_CN.UTF-8语言环境,脚本中在设置该变量时出现异常

解决方法:

apt install language-pack-zh-hans

你可能感兴趣的:(perl: warning: Setting locale failed)