LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-01-2017, 02:25 PM   #1
parasvuori
LQ Newbie
 
Registered: Jun 2014
Distribution: Gentoo
Posts: 5

Rep: Reputation: Disabled
[xubuntu] setting locale failed


For several months I had these settings in Xubuntu's 'Language Support':

Language for menus and windows:
English (United States)
English
(other English variants)
Russian


Display numbers, dates and currency amounts in the usual format for:
Russian


However after one of the system updates I started receiving various 'Setting locale failed' errors:

Code:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "en_US:en",
	LC_ALL = "",
	LC_MEASUREMENT = "en",
	LC_PAPER = "en",
	LC_MONETARY = "en",
	LC_NAME = "en",
	LC_COLLATE = "en_US.UTF-8",
	LC_CTYPE = "en_US.UTF-8",
	LC_ADDRESS = "en",
	LC_NUMERIC = "en",
	LC_MESSAGES = "en_US.UTF-8",
	LC_TELEPHONE = "en",
	LC_IDENTIFICATION = "en",
	LC_TIME = "en",
	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
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Several apps (gnome-split for instance) failed to start unless I executes them with LC_ALL variable set to something (en_US.UTF-8). But I don't want to set LC_ALL permanently because I want these region-specific Russian settings.

I have both en_US.UTF-8 and ru_RU.UTF-8 generated and set in dpkg-reconfigure locales, but the error persists:
Code:
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
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
  en_US.UTF-8... done
  ru_RU.ISO-8859-5... done
  ru_RU.UTF-8... done
Generation complete.
*** update-locale: Warning: LANGUAGE ("en_US:en") is not compatible with LC_ALL (). Disabling it.
 
Old 08-02-2017, 10:31 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,910

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
This appears to be a small configuration error - it is reporting it can't find the DEFAULT locale, not that it can't use one.

Usually that would be specified in the file /etc/locale.conf (at least on Fedora, and from the Ubuntu man pages, the same).
 
Old 08-02-2017, 11:11 AM   #3
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 5,791

Rep: Reputation: 2153Reputation: 2153Reputation: 2153Reputation: 2153Reputation: 2153Reputation: 2153Reputation: 2153Reputation: 2153Reputation: 2153Reputation: 2153Reputation: 2153
I think the problem may be setting LC_ALL="" rather than LC_ALL= — in other words, setting it to something meaningless rather than just not setting it. Another option would be LC_ALL=C.

I'm not positive about this — locale problems seem to be a Debian thing! — but it's worth trying.
 
Old 08-02-2017, 08:16 PM   #4
parasvuori
LQ Newbie
 
Registered: Jun 2014
Distribution: Gentoo
Posts: 5

Original Poster
Rep: Reputation: Disabled
I actually didn't have /etc/locale.conf file. Having created it, I set there LC_ALL to "" to no effect. Further research showed that I have a configuration similar to what I'm going after in /etc/default/locale file:

Code:
#  File generated by update-locale
LANG=en_US.UTF-8
#LANGUAGE="en_US:en"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT=ru_RU.UTF-8
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=
#
#LANGUAGE="en_US:en"
I copied this configuration inside locale.conf but the change got completely ignored again and I received the same errors. Manually sourcing the file however removed all the errors but added weird unsupported characters here and there in the terminal outputs. Can't even wrap my head around what can be wrong here.
 
Old 08-03-2017, 05:32 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,910

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Well, mixing Russian and English can do that.
 
Old 08-04-2017, 04:59 PM   #6
parasvuori
LQ Newbie
 
Registered: Jun 2014
Distribution: Gentoo
Posts: 5

Original Poster
Rep: Reputation: Disabled
But it never did before. I've had this settings for half a year now. I don't get why either /etc/default/locale or /etc/locale.conf get ignored and my locale settings are being set to something completely unrelated.
 
Old 08-05-2017, 05:35 AM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,910

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Quote:
Originally Posted by parasvuori View Post
But it never did before. I've had this settings for half a year now. I don't get why either /etc/default/locale or /etc/locale.conf get ignored and my locale settings are being set to something completely unrelated.
I may be some change was done to how the locale is being handled. Perhaps some earlier bug was identified that ignored some of the specifications.

But that would depend on where/how the odd characters are showing up.
 
  


Reply

Tags
locale, localegen, perl, xubuntu


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
Warning message - Setting locale failed JeremyBoden Linux - Newbie 2 09-01-2015 05:42 PM
Setting locale failed - Tried dpkg-reconfigure locales 31770 Ubuntu 1 02-02-2007 05:37 AM
Setting locale failed godzern Linux - Software 2 10-30-2006 01:32 PM
Setting locale failed linx win Debian 1 04-02-2005 09:46 AM
Setting locale failed?? calculon Linux - General 1 12-04-2001 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:00 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