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:
  socat
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 http://kambing.ui.ac.id/debian/ jessie/main socat amd64 1.7.2.4-2 [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_MONETARY = "id_ID.UTF-8",
	LC_ADDRESS = "id_ID.UTF-8",
	LC_TELEPHONE = "id_ID.UTF-8",
	LC_NAME = "id_ID.UTF-8",
	LC_MEASUREMENT = "id_ID.UTF-8",
	LC_IDENTIFICATION = "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 (1.7.2.4-2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up socat (1.7.2.4-2) ...

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

CMIIW

Advertisements