LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-28-2017, 12:08 PM   #1
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Rep: Reputation: 51
Debian: What is wrong here? locale-gen seems crazy


These terminal line lines show a problem with locales I have with a Debian 9 now. Check the commands and a few details on their output:

Code:
$   locale -a
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_COLLATE to default locale: No 
such file or directory
C
C.UTF-8
POSIX
en_US.utf8

$ # so there are 4 locales installed

$  sudo -s
bash: warning: setlocale: LC_ALL: cannot change locale 
(pt_BR.utf-8)

# locale-gen pt_BR.utf8 # note which locale we generate!
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.

# I did not ask to generate that! Again.

# locale-gen pt_BR.UTF8
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.

# exit   # Give up.

$
What is wrong here?

Last edited by dedec0; 10-28-2017 at 12:09 PM.
 
Old 10-28-2017, 01:00 PM   #2
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Just a guess, but what does your "/etc/default/locale" look like? Was this working before, what changed if so? What is the output of the command "locale" with no switches?

Last edited by sevendogsbsd; 10-28-2017 at 01:02 PM.
 
1 members found this post helpful.
Old 10-28-2017, 01:31 PM   #3
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by sevendogsbsd View Post
Just a guess, but what does your "/etc/default/locale" look like? Was this working before, what changed if so? What is the output of the command "locale" with no switches?
That machine never totally worked (or is not configured to do so, as I think). The locale problem is strange because what I found and tried to fix it, did not really work.

Code:
$  cat /etc/default/locale 
#  File generated by update-locale
LANG="en_US.UTF-8"

$  locale
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
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="pt_BR.utf-8"
LC_NUMERIC="pt_BR.utf-8"
LC_TIME="pt_BR.utf-8"
LC_COLLATE="pt_BR.utf-8"
LC_MONETARY="pt_BR.utf-8"
LC_MESSAGES="pt_BR.utf-8"
LC_PAPER="pt_BR.utf-8"
LC_NAME="pt_BR.utf-8"
LC_ADDRESS="pt_BR.utf-8"
LC_TELEPHONE="pt_BR.utf-8"
LC_MEASUREMENT="pt_BR.utf-8"
LC_IDENTIFICATION="pt_BR.utf-8"
LC_ALL=pt_BR.utf-8
Everything I tried, to change LANG (and others) on that machine, did not work. The first 3 lines of 'locale' without switches output show a problem. I want to change: default locale (I guess you have already showed me); users may change their locale to a different one, but that is not working as it did in other debianish distros.
 
Old 10-28-2017, 01:36 PM   #4
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Hmmm, well, your default shows as "en_US.UTF-8" but you have "pt_BR.utf-8" listed as "LC_CTYPE", etc. Not a locale guru but that seems odd. What do you have uncommented in /etc/locale.gen?
 
Old 10-28-2017, 01:47 PM   #5
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by sevendogsbsd View Post
Hmmm, well, your default shows as "en_US.UTF-8" but you have "pt_BR.utf-8" listed as "LC_CTYPE", etc. Not a locale guru but that seems odd. What do you have uncommented in /etc/locale.gen?
The computer came from USA with everything Usonian. The LC_* being pt_BR now are due things I did.

Tne only uncommented line from my /etc/locale.gen was en_US....!

Now I am changing that... to add a few more.

No guru needed, it should be just my usual problems with basic things.
(:

But I have searched around a bit, what I have found did not work - as I said above.
 
Old 10-28-2017, 01:53 PM   #6
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
After the previous post, I have uncommented pt_* and a few other en_* lines in the file /etc/locale.gen . After that, I closed root account and typed "bash" in the parent terminal.

The error about LC_* variables changed! Now it complained only about LC_ALL:

Code:
bash: warning: setlocale: LC_ALL: cannot change locale 
(pt_BR.utf-8)
 
Old 10-28-2017, 01:54 PM   #7
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
I would start with running "dpkg-reconfigure locales" as the wiki recommends first, and see if that works.
 
Old 10-28-2017, 02:09 PM   #8
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,372

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by sevendogsbsd View Post
I would start with running "dpkg-reconfigure locales" as the wiki recommends first, and see if that works.
The wiki you meant is wiki.debian.org/Locale ?

I have seen that command you said before. I used it trying to solve a clock problem in the same machine. By then, the command I used was:

dpkg-reconfigure tzdata
timedatectl set-local-rtc 1
timedatectl # sys date and time

Let me check if this solved it... seems to!
^,^
 
Old 10-28-2017, 04:01 PM   #9
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: FreeBSD
Posts: 2,252

Rep: Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011Reputation: 1011
Correct, that's the site I looked at.
 
  


Reply

Tags
debian



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
3rd gen CPU in a 2nd Gen Laptop Motherboard benifits are? BW-userx Linux - Hardware 4 05-18-2016 01:56 PM
utf8 locale LDFLAGS -lncursesw wrong, needs to be -lncurses? Mol_Bolom Linux - Software 0 07-26-2009 01:57 AM
after-Installation errors. locale error. unsupported locale settings and two more gh0st Fedora 1 05-02-2008 05:06 AM
DEBIAN 3.1 sid,unstable locale-gen failed !! tclwp Debian 1 05-11-2006 08:37 PM
wrong resolution for a game... please help im going crazy!!!!!!!!!!!! zexter Linux - Software 16 11-02-2003 12:44 AM

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

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