新千葉 ガーベージ・コレクション

FPGA マガジンやインターフェースで書けなかったこと等をちょぼちょぼ書いてます。@ryos36

perl の locale failed

なんかしらんが ubuntu ( Linux subsystem だったりするが ubuntu 全般だろう) で perl を使うと failed とか言われる。

> perl -v
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "ja_JP.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

.cshrc には (bash じゃない!!) には LANG の設定しているがどうやらシステムでちゃんと設定しないとだめらしい。最初 /etc/locale.gen を”直接"編集しようと思ったがいくらなんでもこれじゃだめだろう。さがせば答えがあるね。

qiita.com

> sudo apt-get install language-pack-ja
> sudo update-locale LANG=ja_JP.UTF-8

これでどうよ?

> perl -v
This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-gnu-thread-multi
(with 67 registered patches, see perl -V for more detail)

Copyright 1987-2017, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

おー大丈夫になった。