Debian Wheezy VPSでユーザーを切り替えると、次のロケールとロケールの変更に関連するエラーが発生し続けます。
-su: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
ほとんどすべてのインストール関連タスク(apt-getとdpkg)を実行する場合:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "en_US.UTF-8",
LANG = "en_US.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
私はそれを調べたところ、この種のエラーに関連するいくつかの問題が見つかりました。
出力はlocale -a
次のとおりです
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_COLLATE to default locale: No such file or directory
C
C.UTF-8
POSIX
また、ロケールパッケージをインストールしようとしましたが、うまくいきませんでした。つまり、locale-gen
何も変更されていません。
編集する:出力はstrace locale -a
次のとおりです(テキストが多いので注意してください)。
execve("/usr/bin/locale", ["locale", "-a"], [/* 13 vars */]) = 0
brk(0) = 0x191b000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe6c1353000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=30161, ...}) = 0
mmap(NULL, 30161, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fe6c134b000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\357\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1603600, ...}) = 0
mmap(NULL, 3717176, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fe6c0daa000
mprotect(0x7fe6c0f2c000, 2097152, PROT_NONE) = 0
mmap(0x7fe6c112c000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x182000) = 0x7fe6c112c000
mmap(0x7fe6c1131000, 18488, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fe6c1131000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe6c134a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe6c1349000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe6c1348000
arch_prctl(ARCH_SET_FS, 0x7fe6c1349700) = 0
mprotect(0x7fe6c112c000, 16384, PROT_READ) = 0
mprotect(0x606000, 4096, PROT_READ) = 0
mprotect(0x7fe6c1355000, 4096, PROT_READ) = 0
munmap(0x7fe6c134b000, 30161) = 0
brk(0) = 0x191b000
brk(0x193c000) = 0x193c000
open("/usr/lib/locale/locale-archive", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe6c1352000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2570
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7fe6c1352000, 4096) = 0
open("/usr/lib/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.UTF-8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.utf8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "locale: ", 8locale: ) = 8
write(2, "Cannot set LC_CTYPE to default l"..., 37Cannot set LC_CTYPE to default locale) = 37
write(2, ": No such file or directory", 27: No such file or directory) = 27
write(2, "\n", 1
) = 1
open("/usr/lib/locale/en_US.UTF-8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.UTF-8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.utf8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "locale: ", 8locale: ) = 8
write(2, "Cannot set LC_MESSAGES to defaul"..., 40Cannot set LC_MESSAGES to default locale) = 40
write(2, ": No such file or directory", 27: No such file or directory) = 27
write(2, "\n", 1
) = 1
open("/usr/lib/locale/en_US.UTF-8/LC_COLLATE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_COLLATE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US/LC_COLLATE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.UTF-8/LC_COLLATE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.utf8/LC_COLLATE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_COLLATE", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "locale: ", 8locale: ) = 8
write(2, "Cannot set LC_COLLATE to default"..., 39Cannot set LC_COLLATE to default locale) = 39
write(2, ": No such file or directory", 27: No such file or directory) = 27
write(2, "\n", 1
) = 1
open("/usr/lib/locale/locale-archive", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 3 entries */, 32768) = 80
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
stat("/usr/lib/locale/C.UTF-8/LC_IDENTIFICATION", {st_mode=S_IFREG|0644, st_size=168, ...}) = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap(NULL, 2570, PROT_READ, MAP_SHARED, 3, 0) = 0x7fe6c1352000
lseek(3, 2570, SEEK_SET) = 2570
fstat(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
munmap(0x7fe6c1352000, 2570) = 0
close(3) = 0
fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe6c1352000
write(1, "C\n", 2C
) = 2
write(1, "C.UTF-8\n", 8C.UTF-8
) = 8
write(1, "POSIX\n", 6POSIX
) = 6
exit_group(0) = ?
編集2:出力gcc -v
:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)
編集3:すみません、これはいいえ繰り返します。あなたが言ったように、いくつかの質問を見ましたが、あなたが指定した重複した回答を含むどんな回答も役に立ったか、問題を解決できませんでした。重複のように見えるかもしれませんし、理論的にはそうです。しかし、私の質問が解決されていないので、以前の質問を再度尋ねることは、新しい質問を尋ねるよりも問題を解決するのに役立つとは思わない。
答え1
私はビューにファイルがありません。各データ型は6つのファイルのいずれかに存在できますが、存在しません。
確認するDebianはありませんが、openSUSEを使用すると、たとえばファイル/usr/lib/locale/en_US/LC_CTYPE
とそのファイルが属するパッケージがありますglibc-locale
。
パッケージ名はDebianと同じかもしれません。 (再)インストールする必要があります。