1. View all configured locales in the system
locale -a
2. View all available character set encodings supported by the locale system
locale -m
3. Add GBK encoding
sudo vi /var/lib/locales/supported.d/local
#添加
zh_CN.GBK
zh_CN.GB2312
zh_CN.GB18030
#然后 :wq 保存并退出
4. Update the code
sudo locale-gen
或者
sudo dpkg-reconfigure --force locales
Done appears, the update code is successful