每次运行fuchsia模拟器时都会报出warning:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US",
LC_ALL = (unset),
LC_ADDRESS = "zh_CN.UTF-8",
LC_NAME = "zh_CN.UTF-8",
LC_MONETARY = "zh_CN.UTF-8",
LC_PAPER = "zh_CN.UTF-8",
LC_IDENTIFICATION = "zh_CN.UTF-8",
LC_TELEPHONE = "zh_CN.UTF-8",
LC_MEASUREMENT = "zh_CN.UTF-8",
LC_TIME = "zh_CN.UTF-8",
LC_NUMERIC = "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").
解决办法
- 确认/etc/locale.gen里的内容是否正确。我只用两个locale,en_US.UTF-8 UTF-8和zh_CN.UTF-8 UTF-8,其他的都注释掉或删除。
- 执行locale-gen。
再运行fuchsia模拟器就不报这个warning了。$ sudo locale-gen
Generating locales...
en_US.UTF-8... done
zh_CN.UTF-8... done
Generation complete.