LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-08-2018, 01:03 AM   #1
tux_addict
Member
 
Registered: Dec 2004
Location: Nairobi, Kenya
Distribution: Ubuntu 21.10, Debian 11 (Bullseye)
Posts: 91

Rep: Reputation: 15
Question "Perl: warning: Setting locale failed". Locale not available.


I've tried the usual avenues (namely Google), but none of the solutions offered seem to work!
The problem in short is the following. Whenever I open my bash shell, I get the following annoying message:
Quote:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LANG = "en_KE.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
I am running Debian 9 and I have installed all the locales. My own locale though (en_KE, for Kenya) is not among the available locales.
Any suggestions would be much appreciated!
 
Old 11-08-2018, 03:49 AM   #2
lougavulin
Member
 
Registered: Jul 2018
Distribution: Slackware,x86_64,current
Posts: 279

Rep: Reputation: 100Reputation: 100
In your .bashrc or .bash_profile, add
Code:
export LC_ALL=C
That should do.
 
Old 11-08-2018, 11:17 PM   #3
tux_addict
Member
 
Registered: Dec 2004
Location: Nairobi, Kenya
Distribution: Ubuntu 21.10, Debian 11 (Bullseye)
Posts: 91

Original Poster
Rep: Reputation: 15
Thanks Lougavulin. But that didn't work!
 
Old 11-09-2018, 04:19 AM   #4
lougavulin
Member
 
Registered: Jul 2018
Distribution: Slackware,x86_64,current
Posts: 279

Rep: Reputation: 100Reputation: 100
Did you reload your .bashrc or .bash_profile ?

So to test it :
Code:
perl -e exit
Should return your error.

Code:
export LC_ALL=C
perl -e exit
According to my tests, that should work.

If it does, modify your .bashrc or .bash_profile, or if you are root on the system add it somewhere into /etc/profile.d/.
 
Old 11-09-2018, 04:26 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by tux_addict View Post
I have installed all the locales.
please show us:
Code:
locale -a
also, check if en_KE is available at all:
Code:
grep en_KE /usr/share/i18n/SUPPORTED
lastly, read this: https://wiki.debian.org/Locale
 
Old 11-09-2018, 09:52 AM   #6
tux_addict
Member
 
Registered: Dec 2004
Location: Nairobi, Kenya
Distribution: Ubuntu 21.10, Debian 11 (Bullseye)
Posts: 91

Original Poster
Rep: Reputation: 15
Thank you to everyone who's taken the time to respond!
Yes, lougavulin, I reloaded .bashrc
Quote:
source ~/.bashrc
Meanwhile,
Quote:
perl -e exit
gives no response.
Results for locale -a:
Code:
C
C.UTF-8
POSIX
aa_DJ
aa_DJ.utf8
aa_ER
aa_ER@saaho
aa_ET
af_ZA
af_ZA.utf8
ak_GH
am_ET
an_ES
an_ES.utf8
anp_IN
ar_AE
ar_AE.utf8
ar_BH
ar_BH.utf8
ar_DZ
ar_DZ.utf8
ar_EG
ar_EG.utf8
ar_IN
ar_IQ
ar_IQ.utf8
ar_JO
ar_JO.utf8
ar_KW
ar_KW.utf8
ar_LB
ar_LB.utf8
ar_LY
ar_LY.utf8
ar_MA
ar_MA.utf8
ar_OM
ar_OM.utf8
ar_QA
ar_QA.utf8
ar_SA
ar_SA.utf8ar_SD
ar_SD.utf8
ar_SS
ar_SY
ar_SY.utf8
ar_TN
ar_TN.utf8
ar_YE
ar_YE.utf8
as_IN
ast_ES
ast_ES.utf8
ayc_PE
az_AZ
be_BY
be_BY.utf8
be_BY@latin
bem_ZM
ber_DZ
ber_MA
bg_BG
bg_BG.utf8
bhb_IN.utf8
bho_IN
bn_BD
bn_IN
bo_CN
bo_IN
br_FR
br_FR.utf8
br_FR@euro
brx_IN
bs_BA
bs_BA.utf8
byn_ER
ca_AD
ca_AD.utf8
ca_ES
ca_ES.utf8
ca_ES.utf8@valencia
ca_ES@euro
ca_ES@valenciaca_FR
ca_FR.utf8
ca_IT
ca_IT.utf8
ce_RU
chr_US
cmn_TW
crh_UA
cs_CZ
cs_CZ.utf8
csb_PL
cv_RU
cy_GB
cy_GB.utf8
da_DK
da_DK.utf8
de_AT
de_AT.utf8
de_AT@euro
de_BE
de_BE.utf8
de_BE@euro
de_CH
de_CH.utf8
de_DE
de_DE.utf8
de_DE@euro
de_IT
de_IT.utf8
de_LI.utf8
de_LU
de_LU.utf8
de_LU@euro
doi_IN
dv_MV
dz_BT
el_CY
el_CY.utf8
el_GR
el_GR.utf8
en_AG
en_AUen_AU.utf8
en_BW
en_BW.utf8
en_CA
en_CA.utf8
en_DK
en_DK.iso885915
en_DK.utf8
en_GB
en_GB.iso885915
en_GB.utf8
en_HK
en_HK.utf8
en_IE
en_IE.utf8
en_IE@euro
en_IL
en_IN
en_NG
en_NZ
en_NZ.utf8
en_PH
en_PH.utf8
en_SG
en_SG.utf8
en_US
en_US.iso885915
en_US.utf8
en_ZA
en_ZA.utf8
en_ZM
en_ZW
en_ZW.utf8
eo
es_AR
es_AR.utf8
es_BO
es_BO.utf8
es_CL
es_CL.utf8
es_CO
es_CO.utf8es_CR
es_CR.utf8
es_CU
es_DO
es_DO.utf8
es_EC
es_EC.utf8
es_ES
es_ES.utf8
es_ES@euro
es_GT
es_GT.utf8
es_HN
es_HN.utf8
es_MX
es_MX.utf8
es_NI
es_NI.utf8
es_PA
es_PA.utf8
es_PE
es_PE.utf8
es_PR
es_PR.utf8
es_PY
es_PY.utf8
es_SV
es_SV.utf8
es_US
es_US.utf8
es_UY
es_UY.utf8
es_VE
es_VE.utf8
et_EE
et_EE.iso885915
et_EE.utf8
eu_ES
eu_ES.utf8
eu_ES@euro
eu_FR
eu_FR.utf8eu_FR@euro
fa_IR
ff_SN
fi_FI
fi_FI.utf8
fi_FI@euro
fil_PH
fo_FO
fo_FO.utf8
fr_BE
fr_BE.utf8
fr_BE@euro
fr_CA
fr_CA.utf8
fr_CH
fr_CH.utf8
fr_FR
fr_FR.utf8
fr_FR@euro
fr_LU
fr_LU.utf8
fr_LU@euro
fur_IT
fy_DE
fy_NL
ga_IE
ga_IE.utf8
ga_IE@euro
gd_GB
gd_GB.utf8
gez_ER
gez_ER@abegede
gez_ET
gez_ET@abegede
gl_ES
gl_ES.utf8
gl_ES@euro
gu_IN
gv_GB
gv_GB.utf8
ha_NG
hak_TWhe_IL
he_IL.utf8
hi_IN
hne_IN
hr_HR
hr_HR.utf8
hsb_DE
hsb_DE.utf8
ht_HT
hu_HU
hu_HU.utf8
hy_AM
hy_AM.armscii8
ia_FR
id_ID
id_ID.utf8
ig_NG
ik_CA
is_IS
is_IS.utf8
it_CH
it_CH.utf8
it_IT
it_IT.utf8
it_IT@euro
iu_CA
ja_JP.eucjp
ja_JP.utf8
ka_GE
ka_GE.utf8
kk_KZ
kk_KZ.rk1048
kk_KZ.utf8
kl_GL
kl_GL.utf8
km_KH
kn_IN
ko_KR.euckr
ko_KR.utf8
kok_IN
ks_IN
ks_IN@devanagariku_TR
ku_TR.utf8
kw_GB
kw_GB.utf8
ky_KG
lb_LU
lg_UG
lg_UG.utf8
li_BE
li_NL
lij_IT
ln_CD
lo_LA
lt_LT
lt_LT.utf8
lv_LV
lv_LV.utf8
lzh_TW
mag_IN
mai_IN
mg_MG
mg_MG.utf8
mhr_RU
mi_NZ
mi_NZ.utf8
mk_MK
mk_MK.utf8
ml_IN
mn_MN
mni_IN
mr_IN
ms_MY
ms_MY.utf8
mt_MT
mt_MT.utf8
my_MM
nan_TW
nan_TW@latin
nb_NO
nb_NO.utf8
nds_DE
nds_NLne_NP
nhn_MX
niu_NU
niu_NZ
nl_AW
nl_BE
nl_BE.utf8
nl_BE@euro
nl_NL
nl_NL.utf8
nl_NL@euro
nn_NO
nn_NO.utf8
nr_ZA
nso_ZA
oc_FR
oc_FR.utf8
om_ET
om_KE
om_KE.utf8
or_IN
os_RU
pa_IN
pa_PK
pap_AW
pap_CW
pl_PL
pl_PL.utf8
ps_AF
pt_BR
pt_BR.utf8
pt_PT
pt_PT.utf8
pt_PT@euro
quz_PE
raj_IN
ro_RO
ro_RO.utf8
ru_RU
ru_RU.cp1251
ru_RU.koi8r
ru_RU.utf8ru_UA
ru_UA.utf8
rw_RW
sa_IN
sat_IN
sc_IT
sd_IN
sd_IN@devanagari
se_NO
sgs_LT
shs_CA
si_LK
sid_ET
sk_SK
sk_SK.utf8
sl_SI
sl_SI.utf8
so_DJ
so_DJ.utf8
so_ET
so_KE
so_KE.utf8
so_SO
so_SO.utf8
sq_AL
sq_AL.utf8
sq_MK
sr_ME
sr_RS
sr_RS@latin
ss_ZA
st_ZA
st_ZA.utf8
sv_FI
sv_FI.utf8
sv_FI@euro
sv_SE
sv_SE.iso885915
sv_SE.utf8
sw_KE
sw_TZ
szl_PLta_IN
ta_LK
tcy_IN.utf8
te_IN
tg_TJ
tg_TJ.utf8
th_TH
th_TH.utf8
the_NP
ti_ER
ti_ET
tig_ER
tk_TM
tl_PH
tl_PH.utf8
tn_ZA
tr_CY
tr_CY.utf8
tr_TR
tr_TR.utf8
ts_ZA
tt_RU
tt_RU@iqtelif
ug_CN
uk_UA
uk_UA.utf8
unm_US
ur_IN
ur_PK
uz_UZ
uz_UZ.utf8
uz_UZ@cyrillic
ve_ZA
vi_VN
wa_BE
wa_BE.utf8
wa_BE@euro
wae_CH
wal_ET
wo_SN
xh_ZA
xh_ZA.utf8yi_US
yi_US.utf8
yo_NG
yue_HK
zh_CN
zh_CN.gb18030
zh_CN.gbk
zh_CN.utf8
zh_HK
zh_HK.utf8
zh_SG
zh_SG.gbk
zh_SG.utf8
zh_TW
zh_TW.euctw
zh_TW.utf8
zu_ZA
zu_ZA.utf8
Grepping for "en_KEN" in "/usr/share/i18n/SUPPORTED" returns no results.
Appending "export LANG=en_KE.UTF-8" to my .bashrc file gets rid of the "Setting locale failed" message, but only in the current tab.
 
Old 11-10-2018, 04:03 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
i think you need to actually install some locales.
i think you can only use those that show up when you issue 'locale -a'. there's no english at all???

please read the wiki i linked.

and yes, it seems that en_KE is unavailable.
 
Old 11-10-2018, 11:33 AM   #8
tux_addict
Member
 
Registered: Dec 2004
Location: Nairobi, Kenya
Distribution: Ubuntu 21.10, Debian 11 (Bullseye)
Posts: 91

Original Poster
Rep: Reputation: 15
The solution in this case (on KDE) was as follows:
Go to KDE System Settings -> Regional Settings -> Formats. Change region from Kenya (en_KE) to United Kingdom (en_GB). No more perl setting locale failed warnings!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [9.10/apt-get] "warning: Setting locale failed." littlebigman Ubuntu 6 09-10-2010 05:48 AM
perl: warning: Falling back to the standard locale ("C"). walterbyrd Debian 11 05-14-2009 08:50 AM
"perl: warning: Setting locale failed" walterbyrd Debian 1 12-07-2007 12:24 PM
Chronic: perl: warning: Setting locale failed. kushalkoolwal Debian 6 08-03-2007 02:20 PM
"perl: warning: Setting locale failed." System wide problem Darek84CJ Debian 3 01-25-2006 05:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration