Skip to content

Instantly share code, notes, and snippets.

@thash
Created October 27, 2011 07:10
Show Gist options
  • Save thash/1318959 to your computer and use it in GitHub Desktop.
Save thash/1318959 to your computer and use it in GitHub Desktop.

-bash: warning: setlocale: LC_ALL: cannot change locale (ja_JP.UTF-8)

という表示が出る問題を解決。

まず/etc/default/localeに

# cat /etc/default/locale
LANG="ja_JP.UTF-8"
LC_ALL="ja_JP.UTF-8"
LANGUAGE="ja_JP:ja"

これを設定した後、

# apt-get install language-pack-ja
Setting up language-pack-ja (1:10.10+20110315) ...
Setting up language-pack-ja-base (1:10.10+20110315) ...
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (ja_JP.UTF-8)

# dpkg-reconfigure locales
Generating locales...
  en_US.ISO-8859-1... done
  en_US.UTF-8... done
  ja_JP.UTF-8... up-to-date
Generation complete.

こうすると、

$ date
Thu Oct 27 15:00:38 JST 2011
↓
$ date
2011年 10月 27日 木曜日 15:57:43 JST

日本語になる。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment