关于bash自动补全时出现“-bash: warning: setlocale: LC_CTYPE: cannot change locale”的解决方法

换了一个Openvz的vps,可能同母鸡的人发Ticket要求换locales来着,原来都是UTF8,用的很好,非要改成gbk,我就无语了。

这样在tab自动补全时候经常出现类似的错误如下:

-bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8)

解决方法,编辑/etc/profie,添加一行,如下:

sudo vim /etc/profile
#添加一行
export LC_ALL=C

搞定。

1 thought on “关于bash自动补全时出现“-bash: warning: setlocale: LC_CTYPE: cannot change locale”的解决方法

Leave a Reply

Your email address will not be published. Required fields are marked *