Perl warning Setting locale failed in Debian

pernahkah anda mengalami warning seperti di bawah ini saat menginstall or remove package di debian

root@server-vm:~# apt-get install socat
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 333 kB of archives.
After this operation, 912 kB of additional disk space will be used.
Get:1 jessie/main socat amd64 [333 kB]
Fetched 333 kB in 0s (3227 kB/s)
Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_TIME = "id_ID.UTF-8",
	LC_ADDRESS = "id_ID.UTF-8",
	LC_NAME = "id_ID.UTF-8",
	LC_NUMERIC = "id_ID.UTF-8",
	LC_PAPER = "id_ID.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package socat.
(Reading database ... 46740 files and directories currently installed.)
Preparing to unpack .../socat_1.7.2.4-2_amd64.deb ...
Unpacking socat ( ...
Processing triggers for man-db ( ...
Setting up socat ( ...

jika pernah, berikut ini adalah cara yang saya gunakan untuk mengatasinya

Generating locales

locales yang hilang dapat di generate dengan cara

root@server-vm:~# locale-gen en_US.UTF-8

Setting Locale Settings

locale setting dapat di set (en_US.UTF-8 sebagai contoh) sebagai berikut :

root@server-vm:~# export LANGUAGE=en_US.UTF-8
root@server-vm:~# export LANG=en_US.UTF-8
root@server-vm:~# export LC_ALL=en_US.UTF-8
root@server-vm:~# locale-gen en_US.UTF-8
root@server-vm:~# dpkg-reconfigure locales

perintah dpkg-configure akan memunculkan window dialog pada debian dan bisa memilih locale sesuai yang diinginkan



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.