如何修复错误 perl -e exit?

如何修复错误 perl -e exit?
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_PAPER = "id_ID.UTF-8",
    LC_ADDRESS = "id_ID.UTF-8",
    LC_MONETARY = "id_ID.UTF-8",
    LC_NUMERIC = "id_ID.UTF-8",
    LC_TELEPHONE = "id_ID.UTF-8",
    LC_IDENTIFICATION = "id_ID.UTF-8",
    LC_MEASUREMENT = "id_ID.UTF-8",
    LC_TIME = "id_ID.UTF-8",
    LC_NAME = "id_ID.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

如何修复它?

在你告诉我这个转发之前我已经知道了

添加行:到 /etc/environment & /etc/default/locale

LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LC_TYPE=en_US.UTF-8

并执行命令:

dpkg-reconfigure locales
locale-gen en_US.UTF-8

答案1

将以下行添加到您的/home/username/.bashrc文件中:

导出语言=en_US.UTF-8
导出 LC_ALL=en_US.UTF-8

相关内容