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. Extending JavaScript Natives

    Most built-in JavaScript types are constructors whose prototypes contain the methods and other prope ...

  2. localstorage本地存储

    前段时间项目上用到了本地存储,所以研究看了下,在这做下笔记. 本地存储是一个window的一个属性,分别是localStorage和sessionStorage,两者用法完全相同,只不过一个是sess ...

  3. MSSQLSERVER数据库- 判断全局临时表是否存在

    写一下今天遇到的一个问题. 今天因为一些作用域的问题,我使用了全局临时表,然后我在存储过程里使用了这么一段语句,想判断全局临时表是否存在,如果不存在,则将他DROP掉. 可是这段语句没用. if ex ...

  4. Python 3. 里filter与generator expression的区别

    # -*- coding: utf-8 -*- """ A test to show the difference between filter and genrator ...

  5. OOM-killer 线上设置 +vm +OOM机制

    http://blog.csdn.net/tenfyguo/article/details/9409743 http://blog.csdn.net/tenfyguo/article/details/ ...

  6. cocos2dx下最大纹理大小取决于平台

    原文:http://www.cocos2d-x.org/wiki/Max_size_of_textures_in_cocos2d-x_depends_on_each_platform 在理论上,coc ...

  7. mfc开发问题_v1

    1. 设置对话框按钮背景图片? 首先,设置对话框按钮的属性为Bitmap,然后导入资源文件(一个你需要作为背景的小图片),最后在该对话框类的OnInitDialog函数中添加如下代码: //设置对话框 ...

  8. 解锁Dagger2使用姿势(二) 之带你理解@Scope

    关于Dagger2使用的基础如果你还不了解,可以参考我的上一篇文章解锁Dagger2使用姿势(一),这有助于你理解本篇文章. OK,我们在上篇文章介绍另外Dagger2使用过程中四个基本的注解,分别是 ...

  9. Mac上安装boost开放环境

    方法一: 去Macports官网的下载页面(https://distfiles.macports.org/MacPorts/)下载对用Mac系统的pkg文件,下载完成之后,双击,一路[下一步],到安装 ...

  10. the second assignment of software testing

    作业2期心得体会.第一期仍有未完成的项目,比如应该指定所读课题的范围,是关于哪个方面的. 作业项目一: 安装并使用CheckStyle/PMD与FindBug 现在网络上查找了一番发现checkSty ...