Je! Ninawezaje kurekebisha suala langu la locale?


Nenda kwa jibu lililokubaliwa


Ninapata ujumbe huu kila wakati nikifanya kitu kama kuanza au kusimamisha huduma.

 perl: warning: Setting locale failed.   
perl: warning: Please check that your locale settings:   
        LANGUAGE = "en_US:en",   
        LC_ALL = (unset),   
        LC_MESSAGES = "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   
(Reading database ... 21173 files and directories currently installed.)  
Removing bind9 ...  
 * Stopping domain name service... bind9                                        [ OK ]
Processing triggers for man-db ...   
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   
 

Je! Ninaweza kurekebisha kosa hili?


516





2012-07-11




Idadi ya majibu: 18


Kwanza tafuta locale kuorodhesha ni fungu gani zilizofafanuliwa kwa sasa kwa akaunti ya mtumiaji wa sasa:

 $ locale
LANG=C
LANGUAGE=
LC_CTYPE=fi_FI.UTF-8
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE=fi_FI.UTF-8
LC_MONETARY="C"
LC_MESSAGES=fi_FI.UTF-8
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
 

Kisha toa eneo lililokosekana na upatikane tena mahali pa kuchukua taarifa:

 $ sudo locale-gen "en_US.UTF-8"
Generating locales...
  en_US.UTF-8... done
Generation complete.

$ sudo dpkg-reconfigure locales
Generating locales...
  en_US.UTF-8... up-to-date
Generation complete.
 

Sasa hautaona makosa yoyote tena!


521


2012-12-10

Hakuna kitu kilichopendekezwa hapo juu kilifanya kazi katika kesi yangu (Ubuntu Server 12.04LTS). Kilichosaidia hatimaye ni kuweka faili /etc/environment :

 LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
 

Kwa sababu nyingine ilikosekana. Matokeo ya locale na amri zingine zilionekana kama vigezo vilifafanuliwa vizuri. Kwa maneno mengine usichukue nafasi vitu vyote vya msingi vinatangazwa ambapo inapaswa kutangazwa.


368


2012-12-16

Wanapaswa kutoweka baada ya kutoa:

 sudo locale-gen en_US en_US.UTF-8
sudo dpkg-reconfigure locales 
 

dpkg-reconfigure hurekebisha tena vifurushi baada ya kuwa tayari imewekwa. Ipe majina ya kifurushi au vifurushi ili ujibadilishe upya. Itauliza maswali ya usanidi, kama vile wakati kifurushi kiliwekwa mara ya kwanza.


153


2012-07-11

Ongeza tu yafuatayo kwenye .bashrc faili yako (ikizingatiwa unatumia bash)

 export LC_ALL="en_US.UTF-8"
 

120


2012-11-08

Hili ni shida ya kawaida ikiwa unaunganisha mbali, kwa hivyo suluhisho sio kutangaza eneo lako. Hariri /etc/ssh/ssh_config na maoni maoni nje SendEnv LANG LC_* .


96


2014-10-01

Kuna amri kwa hiyo:

 sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
 

Inasasisha /etc/default/locale na maadili yaliyotolewa.


72


2014-08-01

Kilichonifanyia kazi mnamo 12.10 ilikuwa hii:

 apt-get install language-pack-en-base  
 

Hii ilikuwa baada ya dpkg-reconfigure locales kuzalishwa hakuna matokeo.


32


2013-04-28

Usisahau kutoka kwenye kikao chako cha SSH (au X11 yako) kwa kutoka na kuingia tena kwa magogo tena. Mapendekezo haya yote hayakufanya kazi kwangu isipokuwa nimeingia tena ....


18


2014-09-26

Kwa Ubuntu 12.10 hakuna kati ya hapo juu iliyofanya kazi isipokuwa suluhisho la ratzs. Ninapendekeza kuongeza hii kwa faili yako /etc/bash.bashrc:

 export LC_ALL="en_ZA.UTF-8"
export LC_CTYPE="en_ZA.UTF-8"
 

11


2013-03-27

Nilikuwa nimekwama katika hali ya kuchangaza ambapo mashine yangu ya ndani imewekwa es na kwa hivyo mashine ya mbali (kupitia vagrant ) ilikuwa imetolewa katika hali isiyoshughulikiwa. Kwa hivyo, ilibidi nitumie mwongozo export= tu ili kuwezesha kufanikiwa dpkg-reconfigure . Basi mfumo uko sawa.

 export LC_ALL="en_US.UTF-8"
sudo dpkg-reconfigure locales
 

11


2016-03-22

Niliandika maandishi ya bash kurekebisha juu ya suala hapo juu. Majibu ya hapo juu ni muhimu lakini kuweka viwashe vya kawaida kwa kusafirisha tu maadili katika kutofautisha kwa shell itafanya kazi tu kwa kikao. Nilitatua suala hili kabisa kwa kusafirisha viwete vya kawaida katika faili la .bash_profile. Unaweza pia kutumia /etc/profile faili badala ya .bash_profile .

 echo "export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8">>~/.bash_profile
 

Usisahau na kufuata script katika kuanzisha rahisi. source .bash_profile http://jee-appy.blogspot.com/2016/02/set-locale-on-ubuntu-permanent-solution.html


9


2016-02-27

Unaweza kujaribu:

 export LANGUAGE=ru_RU.UTF-8
export LC_CTYPE=ru_RU.UTF-8
export LC_NUMERIC=ru_RU.UTF-8
export LC_TIME=ru_RU.UTF-8
export LC_COLLATE=ru_RU.UTF-8
export LC_MONETARY=ru_RU.UTF-8
export LC_MESSAGES=ru_RU.UTF-8
export LC_PAPER=ru_RU.UTF-8
export LC_NAME=ru_RU.UTF-8
export LC_ADDRESS=ru_RU.UTF-8
export LC_TELEPHONE=ru_RU.UTF-8
export LC_MEASUREMENT=ru_RU.UTF-8
export LC_IDENTIFICATION=ru_RU.UTF-8
export LC_ALL=ru_RU.UTF-8
 

ru_RU code yako iko wapi


8


2013-06-17

Jibu la sasa lililokubaliwa haitoshi katika mkakati wa utatuzi wa shida kwa sababu unaweza kuwa na makosa ya kibinadamu. Unasanidi mfumo wako en_US lakini en_GB umewasha /etc/locale.gen kama vile nilikuwa kwenye uzi hapa kwa Raspberry Pi 3b. Unapaswa kupeana sehemu zako zote zilizotumiwa kuwezeshwa /etc/locale.gen .

Nilikuwa en_GB.UTF-8 UTF-8 nimewezesha tu ndani /etc/locale.gen . Ingefaa tu kuwezeshwa en_US.UTF-8 UTF-8 kwa sababu ya amri zingine zinazohusika. Kwa hivyo nilitoa maoni kwa GB na US isiyojali, na kila kitu hufanya kazi sasa

 [email protected]:~ $ sudo vim /etc/locale.gen

[email protected]:~ $ sudo locale-gen 
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.

[email protected]:~ $ sudo a2enmod rewrite && a2enmod headers && a2enmod ssl
Module rewrite already enabled
Module headers already enabled
Considering dependency setenvif for ssl:
Module setenvif already enabled
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Module socache_shmcb already enabled
Module ssl already enabled
 

Sasa, sipati makosa hayo ya hapa na amri yoyote.

Mfumo: Raspbian Jessie
Hardware: Raspberry Pi 3b


7



Kama inavyosemwa hapa kwenye Deiki Wiki , unaweza kuhariri /etc/locale.gen na kuongeza maeneo yote (au kuifungua, nilikuwa na orodha ya maeneo yote lakini yote isipokuwa ile nilitumia kama maoni) ungetaka kuungwa mkono na mfumo wako. Kisha, kutekeleza

 sudo dpkg-reconfigure locales
 

kusasisha maeneo kwenye mfumo wako. Sasa, maeneo yote uliyoongeza / yasiyosimamia /etc/locale.gen inapatikana katika mfumo wako bila maonyo yoyote.


6


2014-12-14

Ikiwa unatumia mazingira ya KDE, angalia setlocale.sh faili katika ~/.kde/env/ :

 $ cat ~/.kde/env/setlocale.sh 
export LANG=en_US.UTF-8
export LANGUAGE=en_US:ru:en
 

3


2014-02-05

  1. Unaweza kuhitaji kukimbia sudo dpkg-reconfigure pia kwa programu uliyosanikisha wakati mipangilio ya "locale" imekuwa sio sahihi / hailingani.

    Wakati simulizi ya mfumo ilikuwa haijawekwa kwa usahihi nimeisanikisha vim . Baadaye wakati mfumo wa mfumo ulisanikishwa niliona hali ambayo vim ilikuwa inaonyesha herufi za utf-8 sio sahihi kama alama za kushangaza wakati nano na nilikuwa zinaonyesha kwa less usahihi. Kimbia

     sudo dpkg-reconfigure vim
     

    ilionekana kurekebisha suala hilo baada ya mipangilio ya mfumo kusasishwa.

  2. Niligundua pia kitu kile kile kama kilivyotajwa tayari: Unaweza kuhitaji kukata / kuunganisha tena SSH ili kufanya mabadiliko ionekane.


2


2014-12-18

Kuongeza maandishi yafuatayo ~/.profile kunifanyia kazi:

 export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
 

Ninatumia seva ya Ubuntu 16.04 LTS 64-bit kwenye Linode.


2


2017-05-09

Hii ilinifanyia kazi wakati nilikuwa na shida sawa (kulingana na suluhisho lililotolewa na dman ):

 sudo sh -c "echo -e 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment"
 

2


2014-08-27