LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-03-2015, 05:54 PM   #1
Penguin884
LQ Newbie
 
Registered: Feb 2015
Posts: 5

Rep: Reputation: Disabled
Cannot set to default locale, no such file or directory


Hello all,

I'm having trouble with my locale definitions (at least). I'm on Anti-x 13.1. I wanted to upgrade something, opened up Debian's unstable repo, then tried to get more from there to fix it. All in all, didn't work out so well and it was probably dumb.

Point is, I was hoping I could get some help with the issue I'm seeing now. I can't open Roxterm in X. When I try to open it from console, it shows me a GTK error message talking about locales.

When I run "locale" I get:
Quote:
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
. . .
Notably, "LANGUAGE" and "LC_ALL" had empty strings as values in the output of locale. I tried changing these with "export LC_ALL="en_US.UTF-8"", but the change seems superficial at best.

When I run locale -a I get:
Quote:
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
C
C.UTF-8
POSIX
I can't find the package glibc-locale, the commands dpkg-reconfigure locales or locale-gen. /etc/default/locale already has just the line "LANG=en_US.UTF-8".

As far as I can tell I need to do something with localedef, but I'm not sure how to use it. It's "localedef -c -f [somefile] -i [somefile]"? The man page mentions it will look in the default directory and the current one. Most of the defaults have "usr/share/I18N" which doesn't exist on my system. Another default does say "user/bin/locale", which does exist. I have a "usr/share/locale" as well, but I'm not sure what files in there I might need to be using.

Any guidance, troubleshooting, etc here?

Last edited by Penguin884; 05-05-2015 at 08:29 PM.
 
Old 05-04-2015, 12:46 PM   #2
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
2 things: you write you installed "something" - what exactly?
you write "the change seems superficial at best" - how exactly? so you did affect a change?
btw, i don't think "C.UTF-8" is a valid locale?
on my system it looks like this:
Code:
$ locale -a
C
POSIX
en_US.utf8
 
Old 05-04-2015, 09:01 PM   #3
Penguin884
LQ Newbie
 
Registered: Feb 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
2 things: you write you installed "something" - what exactly?
you write "the change seems superficial at best" - how exactly? so you did affect a change?
btw, i don't think "C.UTF-8" is a valid locale?
on my system it looks like this:
Code:
$ locale -a
C
POSIX
en_US.utf8
Thanks for the response!

Something, I'm not too sure. So, I started off wanting an up to date version of Midori, so I opened up Unstable to get Midori updated + its dependencies. This was already ill-advised, I'm sure. But I no doubt made it worse when that didn't work well, so I opened Unstable back up and did and apt-get dist upgrade. I don't remember if I was getting this specific error before that. Maybe I could go back and look for log files to see what got installed with Midori.

The change I mentioned; They'll show when I run locale as "LC_Whatever=en_US.utf-8" (without the quotes around the value that all the others have). Even when that change is made though, I get those same three errors at the top of either locale command. The change also disappeared after a restart.

The C.UTF-8 does seem a bit suspect. It also seems like I should have one listed with en_ in the name...
 
Old 05-05-2015, 08:29 PM   #4
Penguin884
LQ Newbie
 
Registered: Feb 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
So, I mentioned that dpkg-reconfigure command (recommended in a thread similar to this one) was not found, and I had assumed that wasn't an option for me. I was missing the fact that sbin and /usr/sbin aren't on my path for whatever reason (shouldn't they normally be?).

So I ran dpkg-reconfigure locales:
Quote:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
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
/usr/sbin/dpkg-reconfigure: locales is broken or not fully installed
Don't know why this isn't installed, seems important? But I go ahead and get it anyway. apt-get install locales

LANGUAGE and LC_ALL still appear unset, but I'm not getting error messages about them when I run a bunch of stuff. And now locale -a lists a whole host of things that sound like locales. There are still other problems with my system, and I don't think the locale thing was really the issue. But for this question, I think I can call it solved at the moment.

Thanks again for the response!

Last edited by Penguin884; 05-05-2015 at 08:31 PM.
 
Old 05-06-2015, 03:57 PM   #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
please paste output of:
Code:
$ cat /etc/locale.conf
$ cat /etc/locale.gen
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
locale: Cannot Set LC_ALL to default locale: No such file or directory. asym Linux - General 11 10-24-2018 05:54 PM
"Cannot set LC_CTYPE to default locale: No such file or directory" boofhead Linux - General 2 02-06-2012 08:10 PM
Set default file/directory permissions replica88 Linux - Newbie 2 04-04-2010 10:12 AM
Can I set default file/directory permission levels? toes Linux - Security 5 01-05-2007 06:21 PM
locale: Cannot set LC_ALL to default locale: Invalid argument GadgetWiz Mandriva 1 03-31-2006 11:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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