Sorry, command-not-found has crashed!

新安装了一台ubuntu server

安装时用中文安装的,之后命令行下各种乱码,最后也不知道是修改哪里造成的

每次执行一次错误的命令就会报错:(报错信息如下)

Sorry, command-not-found has crashed! Please file a bug report at:
https://bugs.launchpad.net/command-not-found/+filebug
Please include the following information with the report:

command-not-found version: 0.3
Python version: 3.3.1 final 0
Distributor ID:    Ubuntu
Description:    Ubuntu 13.04
Release:    13.04
Codename:    raring
Exception information:

unsupported locale setting
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 24, in crash_guard
    callback()
  File "/usr/lib/command-not-found", line 69, in main
    enable_i18n()
  File "/usr/lib/command-not-found", line 40, in enable_i18n
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib/python3.3/locale.py", line 541, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

当然后来安装了zsh后解决了,但是vi里面中文还是显示乱码

google了下,说是编码有问题

解决方法

bash下执行命令:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
 
解决!
 
 

最新文章

  1. cross_domain
  2. iOS6_自动约束 Constraints
  3. js中函数的一些理论知识
  4. 不从SD卡启动树莓派2
  5. 练习3:修改withdraw 方法 练习目标-使用有返回值的方法:在本练习里,将修改withdraw方法以返回一个布尔值来指示交易是否成功。
  6. 使用office制作图章公章
  7. 创建链接服务器(dblink)
  8. android AsyncTask 只能在线程池里单个运行的问题
  9. vs vim 插件
  10. 创建一个web Test Plan
  11. Fence Repair
  12. 『重构--改善既有代码的设计』读书笔记----Introduce Local Extension
  13. HashMap之Hash碰撞冲突解决方案及未来改进
  14. 前端工程之node基础
  15. Ubuntu初始化MySQL碰到的坑
  16. Android 异步框架 RxJava2
  17. Mysql----修改MySQL5.7的root的密码
  18. python 读取配置文件方法
  19. PAT 乙级 1036 跟奥巴马一起编程(15) C++版
  20. ehlib使用内存表的方法

热门文章

  1. codis集群和redis cluster的优劣对比
  2. bzoj3926: [Zjoi2015]诸神眷顾的幻想乡 对[广义后缀自动机]的一些理解
  3. SGU107——987654321 problem
  4. Unicode和字符集小结
  5. 在SCVMM2012R2中删除失去联系的VM GateWay
  6. linux ssh 中在window 传文件 下载文件 工具
  7. 【剑指offer】包括min函数的栈
  8. Android AlertDialog 设置setSingleChoiceItems不显示列表的原因【setMessage和setSingleChoiceItems不能同时使用】
  9. [转] Understanding JavaScript’s async await
  10. Java synchronized 总结