0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ERROR: invalid locale name ja_JP.EUC_JPの対処

Last updated at Posted at 2016-08-04

ERROR: invalid locale name ja_JP.EUC_JPの対処

pg_dumpallで作成したファイルからリストアしようとすると次のエラーが発生する。

ERROR:  invalid locale name ja_JP.EUC_JP

ファイルの当該箇所は次のようになっていた。

CREATE DATABASE databasename WITH TEMPLATE = template0 OWNER = postgres ENCODING = 'EUC_JP' LC_COLLATE = 'ja_JP.EUC_JP' LC_CTYPE = 'ja_JP.EUC_JP';

システムにインストールされているロケールは次のとおりだった。

# locale -a
C
en_US.utf8
POSIX

ロケールがないのが原因なので、localedefコマンドでロケールをインストールした。

localedef -i ja_JP -c -f EUC-JP -A /usr/share/locale/locale.alias ja_JP.EUC-JP
0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?