LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-26-2021, 06:31 PM   #1
ryoko
LQ Newbie
 
Registered: Feb 2021
Posts: 6

Rep: Reputation: Disabled
Locale not supported by C library


Hi.
I am using Slackware 14.2 with xfce. Everything was working fine, until i tried to update system.
Now i have problem with locale. i can't save files with non latin characters. The warning i get is
Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale.
I changed /etc/profile.d/lang.sh to have
export LANG=el_GR.utf8
export LC_COLLATE=C
but nothing changed.
When i type locale, i get: Cannot set LC_ALL to default locale.

Any help?

Thank you.
 
Old 02-26-2021, 08:33 PM   #2
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Not sure how Slack is set up but here's what I do. In file /etc/locale.gen in Debian are pretty much every locale, all of which are commented out except the locale for my region. In Gentoo, all it had was "C.UTF8 UTF-8", so I added "en_US.UTF-8 UTF-8" and my locale. After saving the file with the locales I want keeping the C locale also, I ran a couple commands to set the locale.
Below are the locales I found in Debian to match yours:
Quote:
el_GR ISO-8859-7
el_GR.UTF-8 UTF-8
el_GR@euro ISO-8859-7
Add or uncomment the ones you want your system to have/use in /etc/locale.gen, after saving the /etc/local.gen file, as root or sudo run command ----> locale-gen
It will come back saying it found the locales you enabled printing them out, now set the locale with the next command:
Code:
localectl set-locale el_GR.UTF-8
It should now be set and should be shown in /etc/locale.conf or /etc/default/locale
Other examples here.

Last edited by Brains; 02-26-2021 at 09:10 PM.
 
Old 02-26-2021, 09:24 PM   #3
ryoko
LQ Newbie
 
Registered: Feb 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks for the reply. Unfortunately these don't work on Slackware. I believe something is messed real bad after the update. I read in the forum that someone with a similar problem had noticed that
/lib64/ld-linux-x86-64.so.2 -> ld-2.29.so
instead of
/lib64/ld-linux-x86-64.so.2 -> ld-2.23.so
He said that upgradepkg glibc-solibs-2.23-x86_64-4_slack14.2.txz took care of that.
In my case /lib64/ld-linux-x86-64.so.2 -> ld-2.27.so
and i also have a ld-2.23.so in the same folder.
I tried to do the same thing and upgradepkg but nothing.
i don't understand how this works, or if it has to anything with the locale problem.
I may be wrong with this.
 
Old 02-27-2021, 10:09 AM   #4
BrunoLafleur
Member
 
Registered: Apr 2020
Location: France
Distribution: Slackware
Posts: 399

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Quote:
Originally Posted by ryoko View Post
Hi.
I am using Slackware 14.2 with xfce. Everything was working fine, until i tried to update system.
How did you upgrade ? 14.2 has glibc 2.23 and current 2.33 so your actual libs look strange.
 
Old 02-27-2021, 11:47 AM   #5
ryoko
LQ Newbie
 
Registered: Feb 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
I must have broken sth.
If i type
ldd --version
i get
ldd (GNU libc) 2.23
then
ldd `which ls` | grep libc
i get
libcap.so.2 => /lib64/libcap.so.2 (0x00007fb99b69d000)
libc.so.6 => /lib64/libc.so.6 (0x00007fb99b2b3000)
and finally
/lib64/libc.so.6
i get
GNU C Library (GNU libc) stable release version 2.27.

Could this be the cause of locale problems? Is it something repairable?
 
Old 02-27-2021, 01:28 PM   #6
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 904

Rep: Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693
Quote:
Originally Posted by ryoko View Post
I must have broken sth.
If i type
ldd --version
i get
ldd (GNU libc) 2.23
then
ldd `which ls` | grep libc
i get
libcap.so.2 => /lib64/libcap.so.2 (0x00007fb99b69d000)
libc.so.6 => /lib64/libc.so.6 (0x00007fb99b2b3000)
and finally
/lib64/libc.so.6
i get
GNU C Library (GNU libc) stable release version 2.27.

Could this be the cause of locale problems? Is it something repairable?
Yes, looks like something is wrong on your system.

I'm running a fully-patched 14.2 (with multilib), and here is what I get:

Code:
# ldd --version                     
ldd (GNU libc) 2.23
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
# ldd $(which ls) | grep libc
        libcap.so.2 => /lib64/libcap.so.2 (0x00007febe9259000)
        libc.so.6 => /lib64/libc.so.6 (0x00007febe8e90000)
# /lib64/libc.so.6
GNU C Library (GNU libc) stable release version 2.23, by Roland McGrath et al.
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 5.3.0.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
Additionally:

Code:
# ls /var/log/packages/glibc* 
/var/log/packages/glibc-2.23_multilib-x86_64-4alien
/var/log/packages/glibc-i18n-2.23_multilib-x86_64-4alien
/var/log/packages/glibc-profile-2.23_multilib-x86_64-4alien
/var/log/packages/glibc-solibs-2.23_multilib-x86_64-4alien
/var/log/packages/glibc-zoneinfo-2021a-noarch-1_slack14.2
 
Old 02-27-2021, 01:30 PM   #7
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 904

Rep: Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693
Quote:
Originally Posted by ryoko View Post
Is it something repairable?
I would think:

Code:
upgradepkg --reinstall glibc-*.txz
should do the trick.

Where you first cd into the directory where the proper glibc packages are (stock glibc packages or alien's multilib packages).
 
Old 02-27-2021, 01:33 PM   #8
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,782

Rep: Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459
Why don't you tell us what you did when you upgraded?

The locale stuff is in package glibc-i18n-2.23-x86_64-4_slack14.2.

Try these two commands. What is the output?
Code:
$ (cd /var/adm/packages; ls -l *glibc*)
-rw-r--r-- 1 root root  23218 Aug 10  2017 glibc-2.23-x86_64-4_slack14.2
-rw-r--r-- 1 root root 263515 Aug 10  2017 glibc-i18n-2.23-x86_64-4_slack14.2
-rw-r--r-- 1 root root   1065 Aug 10  2017 glibc-profile-2.23-x86_64-4_slack14.2
-rw-r--r-- 1 root root   8546 Aug 10  2017 glibc-solibs-2.23-x86_64-4_slack14.2
-rw-r--r-- 1 root root  71564 Jan 25 07:52 glibc-zoneinfo-2021a-noarch-1_slack14.2
$ (cd /lib64; ls -l ld-*.so* libc.so.6 libc-*.so*)
-rwxr-xr-x 1 root root  179104 Aug  9  2017 ld-2.23.so
lrwxrwxrwx 1 root root      10 Aug 10  2017 ld-linux-x86-64.so.2 -> ld-2.23.so
-rwxr-xr-x 1 root root 2076824 Aug  9  2017 libc-2.23.so
lrwxrwxrwx 1 root root      12 Aug 10  2017 libc.so.6 -> libc-2.23.so
$
 
Old 02-27-2021, 02:20 PM   #9
ryoko
LQ Newbie
 
Registered: Feb 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
$ (cd /var/adm/packages; ls -l *glibc*)
-rw-r--r-- 1 root root 32582 Feb 25 22:56 glibc-2.23_multilib-x86_64-4alien
-rw-r--r-- 1 root root 491578 Feb 25 22:56 glibc-i18n-2.23_multilib-x86_64-4alien
-rw-r--r-- 1 root root 1325 Feb 25 22:56 glibc-profile-2.23_multilib-x86_64-4alien
-rw-r--r-- 1 root root 15563 Feb 25 22:56 glibc-solibs-2.23_multilib-x86_64-4alien
-rw-r--r-- 1 root root 71564 Feb 15 08:49 glibc-zoneinfo-2021a-noarch-1_slack14.2
$ (cd /lib64; ls -l ld-*.so* libc.so.6 libc-*.so*)
-rwxr-xr-x 1 root root 179104 Aug 10 2017 ld-2.23.so
-rwxr-xr-x 1 root root 183512 Jun 13 2018 ld-2.27.so
lrwxrwxrwx 1 root root 10 Feb 25 23:08 ld-linux-x86-64.so.2 -> ld-2.27.so
-rwxr-xr-x 1 root root 2076824 Aug 10 2017 libc-2.23.so
-rwxr-xr-x 1 root root 2225736 Jun 13 2018 libc-2.27.so
lrwxrwxrwx 1 root root 12 Feb 25 23:08 libc.so.6 -> libc-2.27.so
 
Old 02-27-2021, 02:29 PM   #10
ryoko
LQ Newbie
 
Registered: Feb 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
I also tried
upgradepkg --reinstall glibc-*.txz

Nothing changed
 
Old 02-27-2021, 02:54 PM   #11
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,782

Rep: Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459
Ok, you have installed either glibc-solibs-2.27-x86_64-4 or glibc-2.27-x86_64-4, or both (or the corresponding multilib packages). And then reinstalled the correct 2.23. Unfortunately, glibc is not "downgradeable" to 2.23. After and including glibc-2.27, the glibc install script also allows downgrading but not before 2.27. Where did you get that glibc-2.27 ?

It is possible to go back to 2.23, like this:

Code:
cd /lib64
sln ld-2.23.so ld-linux-x86-64.so.2
sln libc-2.23.so libc.so.6
sln libdl-2.23.so libdl.so.2
sln libBrokenLocale-2.23.so libBrokenLocale.so.1
sln libanl-2.23.so libanl.so.1
sln libcidn-2.23.so libcidn.so.1
sln libcrypt-2.23.so libcrypt.so.1
sln libm-2.23.so libm.so.6
sln libmvec-2.23.so libmvec.so.1
sln libnsl-2.23.so libnsl.so.1
sln libnss_compat-2.23.so libnss_compat.so.2
sln libnss_db-2.23.so libnss_db.so.2
sln libnss_dns-2.23.so libnss_dns.so.2
sln libnss_files-2.23.so libnss_files.so.2
sln libnss_hesiod-2.23.so libnss_hesiod.so.2
sln libnss_nis-2.23.so libnss_nis.so.2
sln libnss_nisplus-2.23.so libnss_nisplus.so.2
sln libpthread-2.23.so libpthread.so.0
sln libresolv-2.23.so libresolv.so.2
sln librt-2.23.so librt.so.1
sln libutil-2.23.so libutil.so.1
rm -f l*-2.27*
ldconfig
(Do it in console, do not run X etc... Maybe copy these commands to a script and run it.)

Last edited by Petri Kaukasoina; 02-27-2021 at 03:26 PM.
 
1 members found this post helpful.
Old 02-27-2021, 03:35 PM   #12
ryoko
LQ Newbie
 
Registered: Feb 2021
Posts: 6

Original Poster
Rep: Reputation: Disabled
In console, i did everything you said and now...
all problems solved.
Locale back to normal.GNU C Library also 2.23.

Thank you very very much!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot lock locale archive "/usr/lib64/locale/locale-archive": Permission denied when building Multilib Cross Linux from Scratch Gunnersky2002 Linux - Software 2 06-13-2018 09:28 AM
Gtk-WARNING **: Locale not supported by C library alex.e.c Linux - Software 6 08-11-2014 02:55 PM
"locale not supported by Xlib, locale set to C" Irad Linux - Software 3 06-25-2006 03:59 PM
Gdk-WARNING **: locale not supported by C library letdoit Slackware 1 05-28-2004 10:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:06 PM.

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