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/+filebugPlease include the following information with the report:command-not-found version: 0.3Python version: 3.3.1 final 0Distributor ID: UbuntuDescription: Ubuntu 13.04Release: 13.04Codename: raringException information:unsupported locale settingTraceback (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
解決!新聞熱點
疑難解答
圖片精選