
Ubuntu日本語フォーラム

ログインしていません。
お世話になります。
タイトルの通り、環境変数 $LANGUAGE の設定ファイルは何処にあるのでしょうか?
よろしくお願いします。
オフライン
経験上、環境変数 LANGUAGE の設定ファイルは存在しないと認識しています。
必要であれば、~/.profile や ~/.bashrc などで定義します。
# 環境変数 LANGUAGE はあまり使わないものだと思っていた。
# LANGUAGE を弄るなら LC_MESSAGE を使う方がいいのではないかと。
# もちろん目的次第だけど。
オフライン
lightdm(ログインマネージャ)がLANGを元に設定しているようですね。
オフライン
ry さん、
emasaka さん、ありがとうございます。
debootstrap , chroot した直後に nano をインストールした時のメッセージがこれです。
root@t552-u1404-uefi:/# apt-get install nano
Reading package lists... Done
Building dependency tree... Done
Suggested packages:
spell
The following NEW packages will be installed:
nano
0 upgraded, 1 newly installed, 0 to remove and 17 not upgraded.
Need to get 173 kB of archives.
After this operation, 610 kB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu/ utopic/main nano amd64 2.2.6-3 [173 kB]
Fetched 173 kB in 0s (321 kB/s)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "ja",
LC_ALL = (unset),
LANG = "ja_JP.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package nano.
(Reading database ... 11032 files and directories currently installed.)
Preparing to unpack .../nano_2.2.6-3_amd64.deb ...
Unpacking nano (2.2.6-3) ...
この時点で 「$LANGUAGE , $LANG は設定していないはずなのに?」という事で調べてました。
出来るのかどうかは知らないのですけど、chroot した Ubuntu の環境変数を引き継いだのでしょうか?
オフライン
そういえば、システム ロケールってものがあったのを忘れてました。
/etc/default/locale ファイルの中身を確認してください。
オフライン
ry さん、
あらためて環境を作りました。
debootstrap , chroot , apt-get install nano を実行した直後で、ubuntu-desktop , ubuntu-standard をインストールする前の状態です。
root@t552-u1404-uefi:/etc/default# ls -l
total 44
-rw-r--r-- 1 root root 2025 Feb 3 11:13 console-setup
-rw-r--r-- 1 root root 183 Jul 7 2014 cron
-rw-r--r-- 1 root root 92 May 18 2014 devpts
-rw-r--r-- 1 root root 86 May 18 2014 halt
-rw-r--r-- 1 root root 559 Feb 3 11:13 keyboard
-rw-r--r-- 1 root root 306 Jun 21 2012 networking
-rw-r--r-- 1 root root 1756 Sep 30 14:59 nss
-rw-r--r-- 1 root root 456 Apr 3 2013 ntpdate
-rw-r--r-- 1 root root 691 Feb 3 11:13 rcS
-rw-r--r-- 1 root root 124 Dec 4 2013 rsyslog
-rw-r--r-- 1 root root 1118 Jul 18 2014 useradd
オフライン
makopi による投稿:
debootstrap , chroot , apt-get install nano を実行した直後で、
chroot した環境に /usr/share/locale などが無いため、メッセージ ファイルを読み込めないというエラーっぽいですね。
chroot の代わりに LANG=C chroot とか LANGUAGE=C chroot とかで実行して、環境変数 LANG、LANGUAGE の値がどうなるか確認してはどうでしょう。
オフライン
chroot の代わりに LANG=C chroot とか LANGUAGE=C chroot とかで実行して、環境変数 LANG、LANGUAGE の値がどうなるか確認してはどうでしょう。
環境変数の値を変更して chroot を実行したらその値になっていました。
先に記した
LANGUAGE = "ja",
LANG = "ja_JP.UTF-8"
は実行元の環境変数の値のようです。
疑問が解けました。ありがとうございました。
オフライン