gpt4 book ai didi

unix - zsh 中的 LANG 环境变量

转载 作者:行者123 更新时间:2023-12-04 06:37:20 26 4
gpt4 key购买 nike

我最近在一台新的 ubuntu 机器上安装了 sublime text。
在启动期间,我收到以下错误消息:

Your system's locale is set to a value that can not handle non-ASCII characters. Package Control can not properly work unless this is fixed.

On Linux, please reference your distribution's docs for information on properly setting the LANG environmental variable. As a temporary work-around, you can launch Sublime Text from the terminal with:

   LANG=en_US.UTF-8 sublime_text


我在终端(zsh shell)中检查了以下内容 echo $LANG但这不会返回任何内容,我将以下两行添加到 ~/.profile并重新启动终端,但这并没有帮助 echo $LANG什么都没回?

如何设置我的 LANG zsh shell 中的 env 变量?

最佳答案

用户

您可以申报和导出LANG您的 ~/.zshrc 中的环境变量

export LANG=en_US.UTF-8

注销并再次登录以激活。

全系统

对于系统范围的配置编辑 /etc/default/locale如下:
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"

查看

您可以获得 information about your locale和:
locale

关于unix - zsh 中的 LANG 环境变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24995089/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com