一、描述
输入汉字自动触发补全:
display all 952 possibilities? (y or n)
是因为容器中没有中文字符集和中文字体导致的,安装中文字体,并设置字符集即可。
二、解决
1、安装字符集
(1)查看系统支持的字符集
locale -a
(2)安装zh_cn.utf8
字符集
apt-get update -y && apt-get install language-pack-zh-hans -y
(3)安装之后发现支持zh_cn.utf8
字符集了
2、设置字符集
(1)查看当前系统字符集
locale
此字符集不支持中文。
(2)设置字符集
echo "export lc_all=zh_cn.utf8" >> /etc/profile echo "export lang=zh_cn.utf8" >> /etc/profile
使其生效:
source /etc/profile
(3)再次查看字符集
(4)验证
重新打开终端,或直接输入bash
,即可生效
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持代码网。
发表评论