zoukankan      html  css  js  c++  java
  • 关于ubuntu上执行错误命令报错

    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
     
    解决!
     
     
  • 相关阅读:
    四叉树编码存储的实现
    窗体之间传递值的几种方法
    常见的六种排序算法实现
    OracleHelper类
    c#动态加载dll文件
    STL学习系列九:Map和multimap容器
    STL学习系列八:Set和multiset容器
    STL学习系列七:优先级队列priority_queue容器
    STL学习系列六:List容器
    STL学习系列五:Queue容器
  • 原文地址:https://www.cnblogs.com/mhten/p/3733607.html
Copyright © 2011-2022 走看看