W: perl: warning: Setting locale failed
Jing, mqjing@gmail.com
ETA: 5 mins
On-line Version: (view)
Reproduce Steps
Step 1: Enter chroot
sudo chroot ~/chroot/chroot-amd64-ubuntu10.04/
Step 2: Install daemon package
apt-get install daemon
(# dpkg --remove daemon)
Got Error Message
(sqm-android-lucid)root@jing-XPS-L412Z:/# apt-get install daemon
Reading package lists... Done
Building dependency tree
Reading state information... Done
daemon is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 98 not upgraded.
(sqm-android-lucid)root@jing-XPS-L412Z:/# dpkg --remove daemon
(Reading database ... 22565 files and directories currently installed.)
Removing daemon ...
(sqm-android-lucid)root@jing-XPS-L412Z:/# apt-get install daemon
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
daemon
0 upgraded, 1 newly installed, 0 to remove and 98 not upgraded.
Need to get 0B/97.4kB of archives.
After this operation, 283kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
daemon
Install these packages without verification [y/N]? y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_TIME = "zh_TW.UTF-8",
LC_MONETARY = "zh_TW.UTF-8",
LC_ADDRESS = "zh_TW.UTF-8",
LC_TELEPHONE = "zh_TW.UTF-8",
LC_NAME = "zh_TW.UTF-8",
LC_MEASUREMENT = "zh_TW.UTF-8",
LC_IDENTIFICATION = "zh_TW.UTF-8",
LC_NUMERIC = "zh_TW.UTF-8",
LC_PAPER = "zh_TW.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
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously deselected package daemon.
(Reading database ... 22558 files and directories currently installed.)
Unpacking daemon (from .../daemon_0.6.4-1_amd64.deb) ...
Setting up daemon (0.6.4-1) ...
|
Solution
# Step 1: Create locale files for en_US, en_US.UTF-8, zh_TW and zh_TW.UTF-8
locale-gen en_US en_US.UTF-8 zh_TW zh_TW.UTF-8
# Step 2: Reconfigures packages after they have already been installed
dpkg-reconfigure locales
|
Reference:
http://ubuntuforums.org/showthread.php?t=1346581