gpt4 book ai didi

ubuntu - VM 使用 latin1 的 native 名称编码运行,这可能会导致 Elixir 出现故障,因为它期望使用 utf8

转载 作者:太空宇宙 更新时间:2023-11-03 16:41:49 26 4
gpt4 key购买 nike

如何解决每次执行Elixir代码或输入iex时提示这个警告?

warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)

$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.utf8
LANGUAGE=en_US:
LC_CTYPE=UTF-8
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty

最佳答案

显然未设置 LC_ALL= 是问题所在,我检查过

$ cat /etc/default/locale
LANG="en_US.utf8"
LANGUAGE="en_US:"

确保 LC_ALL 丢失,为了修复它,我执行了:

$ sudo update-locale LC_ALL=en_US.UTF-8

此命令将 LC_ALL 添加到 /etc/default/locale 文件:

$ cat /etc/default/locale
LANG="en_US.utf8"
LANGUAGE="en_US:"
LC_ALL=en_US.UTF-8

错误消失了。

关于ubuntu - VM 使用 latin1 的 native 名称编码运行,这可能会导致 Elixir 出现故障,因为它期望使用 utf8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32407164/

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