Sorry, command-not-found has crashed!python
新安裝了一臺ubuntu serverubuntu
安裝時用中文安裝的,以後命令行下各類亂碼,最後也不知道是修改哪裏形成的bash
每次執行一次錯誤的命令就會報錯:(報錯信息以下)google
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裏面中文仍是顯示亂碼.net
google了下,說是編碼有問題命令行
解決方法code
bash下執行命令:orm
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