LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Chronic: perl: warning: Setting locale failed. (http://www.linuxquestions.org/questions/debian-26/chronic-perl-warning-setting-locale-failed-574006/)

kushalkoolwal 08-01-2007 04:34 PM

perl: warning: Setting locale failed. (Solution found)
 
I know most of you must be familiar with the following messages:
Code:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US:en_GB:en",
        LC_ALL = (unset),
        LANG = "en_US"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

or

Code:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US:en_GB:en",
        LC_ALL = (unset),
        LANG = "en_US"
    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


I have tried every possible thing that I could to get rid of these messages but I failed everytime. Once I had a similar problem with Sarge(stable) and I was able to solve the problem like this:
http://www.linuxquestions.org/questi...d.php?t=407835

but unfortunately this does not work in Etch (stable).

Can anyone please tell me how do I get rid of these errors?

I have tried:
Code:

dpkg-reconfigure locales
dpkg-reconfigure localeconf

Would really appreciate if some can help. I am using Debian Etch with 2.6.18 Kernel.

Thanks

HappyTux 08-02-2007 03:36 PM

Try installing localepurge then select the ones you want to remain on the system you should see it generating the ones you want at the end hopefully this solves it and make sure that your version of locales matches the version number of the libc6 you have installed.

kushalkoolwal 08-02-2007 04:12 PM

Quote:

Originally Posted by HappyTux
Try installing localepurge then select the ones you want to remain on the system you should see it generating the ones you want at the end hopefully this solves it and make sure that your version of locales matches the version number of the libc6 you have installed.

Yeah I tried generating the locales and it does generates but still the warning appears...

I think the problem might what you mentioned about the version number of locales and libc6. How do I matched those....

I recently upgraded from sarge to etch...

Thanks for your reply.

HappyTux 08-02-2007 04:38 PM

Quote:

Originally Posted by kushalkoolwal
Yeah I tried generating the locales and it does generates but still the warning appears...

I think the problem might what you mentioned about the version number of locales and libc6. How do I matched those....

I recently upgraded from sarge to etch...

Thanks for your reply.

Just use apt-cache policy libc6 locales they should have the same version numbers like below if not the same then upgrade.

Code:

apt-cache policy libc6 locales
libc6:
  Installed: 2.6-2
  Candidate: 2.6-2
  Version table:
    2.6-5 0
        600 http://ftp2.de.debian.org sid/main Packages
 *** 2.6-2 0
        990 http://ftp2.de.debian.org testing/main Packages
        100 /var/lib/dpkg/status
locales:
  Installed: 2.6-2
  Candidate: 2.6-2
  Version table:
    2.6-5 0
        600 http://ftp2.de.debian.org sid/main Packages
 *** 2.6-2 0
        990 http://ftp2.de.debian.org testing/main Packages
        100 /var/lib/dpkg/status

Since you recently upgraded make sure everything got to your etch version by using apt-get dist-upgrade or if using aptitude use whatever is the equal of that apt command with it.

kushalkoolwal 08-02-2007 09:23 PM

Quote:

Originally Posted by HappyTux
Just use apt-cache policy libc6 locales they should have the same version numbers like below if not the same then upgrade.

Code:

apt-cache policy libc6 locales
libc6:
  Installed: 2.6-2
  Candidate: 2.6-2
  Version table:
    2.6-5 0
        600 http://ftp2.de.debian.org sid/main Packages
 *** 2.6-2 0
        990 http://ftp2.de.debian.org testing/main Packages
        100 /var/lib/dpkg/status
locales:
  Installed: 2.6-2
  Candidate: 2.6-2
  Version table:
    2.6-5 0
        600 http://ftp2.de.debian.org sid/main Packages
 *** 2.6-2 0
        990 http://ftp2.de.debian.org testing/main Packages
        100 /var/lib/dpkg/status

Since you recently upgraded make sure everything got to your etch version by using apt-get dist-upgrade or if using aptitude use whatever is the equal of that apt command with it.


Great, Thanks I will try that. On a second note, do you know what options to give in apt-get cache policy to check for every package, whether they made into etch or not....

HappyTux 08-02-2007 10:02 PM

Quote:

Originally Posted by kushalkoolwal
Great, Thanks I will try that. On a second note, do you know what options to give in apt-get cache policy to check for every package, whether they made into etch or not....


Install apt-show-versions then apt-show-versions | grep No should get you a list every package that is not in Etch.

kushalkoolwal 08-03-2007 03:20 PM

Solution Found!!!!!
 
Quote:

Originally Posted by HappyTux
Just use apt-cache policy libc6 locales they should have the same version numbers like below if not the same then upgrade.

Code:

apt-cache policy libc6 locales
libc6:
  Installed: 2.6-2
  Candidate: 2.6-2
  Version table:
    2.6-5 0
        600 http://ftp2.de.debian.org sid/main Packages
 *** 2.6-2 0
        990 http://ftp2.de.debian.org testing/main Packages
        100 /var/lib/dpkg/status
locales:
  Installed: 2.6-2
  Candidate: 2.6-2
  Version table:
    2.6-5 0
        600 http://ftp2.de.debian.org sid/main Packages
 *** 2.6-2 0
        990 http://ftp2.de.debian.org testing/main Packages
        100 /var/lib/dpkg/status

Since you recently upgraded make sure everything got to your etch version by using apt-get dist-upgrade or if using aptitude use whatever is the equal of that apt command with it.

It seems that my locales and libc6 were at the etch version i.e. the installed and candidate values were the same. But still that didn't solve the problem....

But guess what I was able to solve the problem by editing the /etc/environment manually..Here is my /etc/environment file:
Code:

LANGUAGE = en_US
LC_ALL = en_US
LANG = en_US
LC_TYPE = en_US

Also, I would recommend to run dpkg-reconfigure locales after you edit your /etc/environment file.:)

I hope this might be useful to anyone who has the same problem. At least it will help to save their time....at least couple of hours...;)


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