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
 
解决!
 
 

关于ubuntu上执行错误命令报错的更多相关文章

  1. react-native在mac上执行gradlew命令报错 ./gradlew: command not found

    这是因为react-native项目是windows上初始化,通过git clone到mac机器上后gradlew这个文件没有可执行权限,如图: 所以只需要给gradlew这个文件增加可执行权限就可以 ...

  2. Python3安装Celery模块后执行Celery命令报错

    1 Python3安装Celery模块后执行Celery命令报错 pip3 install celery # 安装正常,但是执行celery 命令的时候提示没有_ssl模块什么的 手动在Python解 ...

  3. 安装atlas后执行hive命令报错

    在集群中安装atlas,在安装atlas的节点上执行hive -e "show databases;" 正常,但是在集群中其他节点上执行hive -e "show dat ...

  4. Jenkins中执行docker命令报错

    Cannot connect to the Docker daemon. Is the docker daemon running on this host?   在配置Jenkins从Gitlab自 ...

  5. 执行yum命令报错"Unable to connect to Registration Management Service"

    问题描述 linux上执行yum相关命令时,报无法连接到注册管理服务的错误,具体报错信息如下 [root@aijihe-core-zy-2-3 ~]# yum install gcc Loaded p ...

  6. 执行openstack命令报错【You must provide a username via either -...】

    openstack环境搭建好后,openstack的服务都启动了,当执行openstack命令时如nova service list报如下错误 You must provide a username ...

  7. Mac 升级后idea执行git命令报错xcrun: error: invalid active developer path的解决办法

    报错 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun ...

  8. 执行Docker命令报错解决办法

    shim error: docker-runc not installed on system   服务器重启以后,执行docker命令报以上错误,解决办法如下: cd /usr/libexec/do ...

  9. hbase shell中执行list命令报错:ERROR: org.apache.hadoop.hbase.PleaseHoldException: Master is initializing

    问题描述: 今天在测试环境中,搭建hbase环境,执行list命令之后,报错: hbase(main):001:0> list TABLE ERROR: org.apache.hadoop.hb ...

随机推荐

  1. OcciWrapper使用指南(高性能Oracle访问组件)

    occiwrapper使用指南 occiwrapper是一个开源的.跨平台的Oracle访问组件, 方便C++开发者们灵活地操作oracle数据库.为了方便使用,组件中的接口形式参考的POCO库的使用 ...

  2. 【面试虐菜】—— MongoDB知识整理

    为什么我们要使用MongoDB? 特点: 高性能.易部署.易使用,存储数据非常方便.主要功能特性有: 面向集合存储,易存储对象类型的数据. 模式自由. 支持动态查询. 支持完全索引,包含内部对象. 支 ...

  3. Quartz 多个触发器

    http://www.oschina.net/code/snippet_114990_4440 最近项目中要做个定时生成静态html文件东东,7点到19点每5分钟生成一次,其他时间1小时生成一次,刚开 ...

  4. Java 动态生成 复杂 .doc文件

    阅读目录 1.word 里面调整好排版,包括你想生成的动态部分,还有一些不用生成的规则性的文字 2. 将 word 文档保存为 xml 3.用 Firstobject free XML edito 打 ...

  5. 成员方法的this指针

    1.我们知道成员方法中,有个隐式的this常量指针.考虑,Derived继承的成员方法中this指针的表面类型是什么?子类重写的虚方法中this指针的表面类型是什么? 2.Derived继承的方法,就 ...

  6. android webview内容压线问题解决方法

    最近在使用webview做页面开发,项目上要求webview在获取到焦点的时候需要有边框线,于是添加上了webview的选中效果,但是出现了网页中的内容压选中框的情况.之后给webview添加padd ...

  7. sharepoint 2013 更改搜索server组态

    1.新搜索server在.安装sharepoint server 2013,并连接到一个现有的sharepoint server领域,完成后.您可以配置新的搜索server. 打开sharepoint ...

  8. 3 分钟学会调用 Apache Spark MLlib KMeans

    Apache Spark MLlib是Apache Spark体系中重要的一块拼图:提供了机器学习的模块.只是,眼下对此网上介绍的文章不是非常多.拿KMeans来说,网上有些文章提供了一些演示样例程序 ...

  9. QtSpeech会让Qt说话

    想要多了解QtSpeech,那么随着本文的文字往下走吧!QtSpeech是一个Qt封装的跨平台TTS(文本变成语音输出)API,在不同平台下利用系统自带的TTS引擎.在Windows下使用SAPI, ...

  10. Android环境变量笔记

    Logcat打印日志 使用方法Log.i(tag, msg);参数tag: 标签.用于识别Logcat的分类(一般可以使用类名作为标签)数msg: 打印的内容 在eclipse中打开logcat标签W ...