LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-10-2010, 03:30 PM   #16
rockslinux
Member
 
Registered: Jan 2010
Location: Orenburg
Distribution: Slackware
Posts: 35

Rep: Reputation: 18

I have no ideas.
As far as I know. To "upgrade" (reconstruction) locale, poidei should be sufficient, update glibc and perform localedef, followed (if necessary) set the default locale.
For complete information, show:
/etc/profile.d/lang.csh
/etc/profile.d/lang.sh
And some information (I think you read it):
http://www.opengroup.org/onlinepubs/...bd_chap07.html
http://linux.die.net/man/5/locale
http://linux.die.net/man/1/localedef
Of course, I think, but I don `t know what more we can advise.
Perhaps the reason lies in glibc

Last edited by rockslinux; 03-10-2010 at 03:38 PM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-10-2010, 08:58 PM   #17
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
How about running locale with strace? It might help to know what it is doing that results in the "Cannot set LC_* to default locale: No such file or directory" messages.
 
Old 03-10-2010, 11:10 PM   #18
BILLYKANE
Member
 
Registered: Feb 2008
Location: Hefei,Anhui,China
Distribution: Slackware;chakra
Posts: 96

Rep: Reputation: 22
How about reinstall glibc-solibs, glibc, glibc-i18n?

I notice you write:

slackpkg install-new && slackpkg upgrade-all

and it seems slackpkg install-new should run after slackpkg upgrade-all.
 
Old 03-11-2010, 03:46 AM   #19
Affromen
Member
 
Registered: Mar 2008
Location: Kaunas, Lithuania
Distribution: Slackware forever
Posts: 30

Original Poster
Rep: Reputation: 17
Well i have tried to reinstall glibc related packages, this time from slackware dvd, but still no effect :/ As suggested i have tried to run srace on locale, this is what i get:
Code:
$ strace locale
execve("/usr/bin/locale", ["locale"], [/* 36 vars */]) = 0
brk(0)                                  = 0x8b2c000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77ae000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=90821, ...}) = 0
mmap2(NULL, 90821, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7797000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340l\1\0004\0\0\0\214"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1655276, ...}) = 0
mmap2(NULL, 1435912, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7638000
mprotect(0xb7790000, 4096, PROT_NONE)   = 0
mmap2(0xb7791000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x158) = 0xb7791000
mmap2(0xb7794000, 10504, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7794000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7637000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb76376c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7791000, 8192, PROT_READ)   = 0
mprotect(0x804e000, 4096, PROT_READ)    = 0
mprotect(0xb77cd000, 4096, PROT_READ)   = 0
munmap(0xb7797000, 90821)               = 0
brk(0)                                  = 0x8b2c000
brk(0x8b4d000)                          = 0x8b4d000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1670048, ...}) = 0
mmap2(NULL, 1670048, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb749f000
close(3)                                = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb749e000
read(3, "# Locale name alias data base.\n# "..., 4096) = 2570
read(3, ""..., 4096)                    = 0
close(3)                                = 0
munmap(0xb749e000, 4096)                = 0
open("/usr/lib/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=256444, ...}) = 0
mmap2(NULL, 256444, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7460000
close(3)                                = 0
munmap(0xb7460000, 256444)              = 0
open("/usr/lib/locale/en_US/LC_CTYPE", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=221732, ...}) = 0
mmap2(NULL, 221732, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7468000
close(3)                                = 0
munmap(0xb7468000, 221732)              = 0
open("/usr/lib/locale/en.UTF-8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.utf8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "locale: "..., 8locale: )              = 8
write(2, "Cannot set LC_CTYPE to default lo"..., 37Cannot set LC_CTYPE to default locale) = 37
write(2, ": No such file or directory"..., 27: No such file or directory) = 27
write(2, "\n"..., 1
)                    = 1
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "locale: "..., 8locale: )              = 8
write(2, "Cannot set LC_ALL to default loca"..., 35Cannot set LC_ALL to default locale) = 35
write(2, ": No such file or directory"..., 27: No such file or directory) = 27
write(2, "\n"..., 1
)                    = 1
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb749e000
write(1, "LANG=en_US.UTF-8\n"..., 17LANG=en_US.UTF-8
)   = 17
write(1, "LC_CTYPE=\"en_US.UTF-8\"\n"..., 23LC_CTYPE="en_US.UTF-8"
) = 23
write(1, "LC_NUMERIC=\"en_US.UTF-8\"\n"..., 25LC_NUMERIC="en_US.UTF-8"
) = 25
write(1, "LC_TIME=\"en_US.UTF-8\"\n"..., 22LC_TIME="en_US.UTF-8"
) = 22
write(1, "LC_COLLATE=C\n"..., 13LC_COLLATE=C
)       = 13
write(1, "LC_MONETARY=\"en_US.UTF-8\"\n"..., 26LC_MONETARY="en_US.UTF-8"
) = 26
write(1, "LC_MESSAGES=\"en_US.UTF-8\"\n"..., 26LC_MESSAGES="en_US.UTF-8"
) = 26
write(1, "LC_PAPER=\"en_US.UTF-8\"\n"..., 23LC_PAPER="en_US.UTF-8"
) = 23
write(1, "LC_NAME=\"en_US.UTF-8\"\n"..., 22LC_NAME="en_US.UTF-8"
) = 22
write(1, "LC_ADDRESS=\"en_US.UTF-8\"\n"..., 25LC_ADDRESS="en_US.UTF-8"
) = 25
write(1, "LC_TELEPHONE=\"en_US.UTF-8\"\n"..., 27LC_TELEPHONE="en_US.UTF-8"
) = 27
write(1, "LC_MEASUREMENT=\"en_US.UTF-8\"\n"..., 29LC_MEASUREMENT="en_US.UTF-8"
) = 29
write(1, "LC_IDENTIFICATION=\"en_US.UTF-8\"\n"..., 32LC_IDENTIFICATION="en_US.UTF-8"
) = 32
write(1, "LC_ALL=\n"..., 8LC_ALL=
)             = 8
exit_group(0)                           = ?
But i am not sure i understand this output :/

i see there are "no such file" errors here and there like:
/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo
/etc/ld.so.preload

I have tried to search for these files in this package finding site: http://slak.homelinux.org/pkgs/ but i cannot seem to find any packages that these files would belong to :/

As for the rest strace output, i do not really understand it at all
 
Old 03-11-2010, 03:50 AM   #20
Affromen
Member
 
Registered: Mar 2008
Location: Kaunas, Lithuania
Distribution: Slackware forever
Posts: 30

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by BILLYKANE View Post
I notice you write:

slackpkg install-new && slackpkg upgrade-all

and it seems slackpkg install-new should run after slackpkg upgrade-all.
Well i am not sure, i think i actually ran these commands in this order:
1. slackpkg update
2. slackpkg upgrade-all
3. slackpkg clean-system
4. Slackpkg install-new

But there is a possibility of me not remembering things correctly cause of sleepless nights and lots of hair pulling

May i ask, what one should do if used slackpkg in a wrong order?
 
Old 03-11-2010, 05:26 AM   #21
Affromen
Member
 
Registered: Mar 2008
Location: Kaunas, Lithuania
Distribution: Slackware forever
Posts: 30

Original Poster
Rep: Reputation: 17
Kind of Solved this problem, by not the cleanest method out there, but it seems to work so far.

What i did was edit /etc/slackpkg/mirrors there i uncommented one of the -current mirrors.

Then updated slackpkg:

slackpkg update

Then i installed glibc from -current repository

slackpkg upgrade package glibc

Then ncurses window appeared, and i selected all 5 glibc packages:

glibc-2.11.1-i486-2
glibc-i18n-2.11.1-i486-2
glibc-profile-2.11.1-i486-2
glibc-solibs-2.11.1-i486-2
glibc-zoneinfo-2.11.1-noarch-2

when prompted with question what to do with the old config files, i selected to overwrite them, so i had to reedit my inittab and rc.* files and /etc/profile.d/lang.sh lang.csh to my needs again Then after reboot all is back to normal with the locales:

Code:
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
And my utf-8 dependent applications started to work once again

P.S.
I am aware that mixing packages from stable and current is not a good idea, and this solution might bring me some another problems, but at least this way i am able to use my system to my needs fully. So if anyone would encounter same problem, this is possible fix, but keep your fingers crossed and do not take this as a true solid and clean fix, i think of it like "temporary work around"

Thank you for all who tried to help ofc

Last edited by Affromen; 03-11-2010 at 05:27 AM.
 
Old 03-11-2010, 07:55 AM   #22
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,770

Rep: Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455Reputation: 1455
Hi,

I know this is a bit late for you but here is an explanation for you. The glibc and glibc-solibs packages put the critical libraries first to /lib/incoming subdirectory and only then move them to the correct place. That's why, after upgrading glibc, you can see all the old libraries in /lib in addition to the new ones. (upgradepkg or removepkg do not remove the old versions because they are on disk in /lib/lib*-2.*.so but according to the /var/adm/packages/glibc* files they are in /lib/incoming/lib*-2.*.so). That's ok if you upgrade them because ldconfig links to the latest library versions. But you got the problem because you downgraded. ldconfig made the links to the newer versions. For example, in clean Slackware-13.0 you should only have one libc library in /lib and the link points to that one:

Code:
-rwxr-xr-x  1 root root 1658350 Apr  3  2009 libc-2.9.so
lrwxrwxrwx  1 root root      14 Mar 11 13:08 libc.so.6 -> libc-2.9.so
In clean Slackware-current you have this:

Code:
-rwxr-xr-x  1 root root 1655276 Feb 28 17:32 libc-2.11.1.so
lrwxrwxrwx  1 root root      14 Mar 11 13:08 libc.so.6 -> libc-2.11.1.so
After upgrading 13.0 to current OR after downgrading current to 13.0 you have them both and ldconfig creates the symbolic link to the one with a larger version number:

Code:
-rwxr-xr-x  1 root root 1655276 Feb 28 17:32 libc-2.11.1.so
-rwxr-xr-x  1 root root 1658350 Apr  3  2009 libc-2.9.so
lrwxrwxrwx  1 root root      14 Mar 11 13:08 libc.so.6 -> libc-2.11.1.so
You can remove the wrong one manually but it is not necessary if you upgraded. But if you downgraded from current to 13.0 you are still using the current libc-2.11.1 ! But all the supporting files (locales etc) are for libc-2.9. Something has changed between those versions, and you get the "locale: Cannot set LC_CTYPE to default locale: No such file or directory" etc errors.

I guess you could have fixed it by first removing all lib*-2.11.1* from /lib and then giving command ldconfig which recreates the links. ldconfig is statically linked, so it's no problem that you don't have working libc links for a moment between rm and ldconfig. But it's not completely ready yet. The only problem is the ld-linux.so.2 link. You can't just remove ld-2.11.1.so and assume even the static commands work. Boot from e.g. DVD, mount the hard drive root directory somewhere, rm ld-2.11.1.so and make a new link from ld-2.9.so to ld-linux.so.2.

EDIT: I did a small test. Don't try what I described above. It will bomb after ldconfig because of the ld-linux.so.2 link which points to a different version of ld-2.*.so compared to other stuff. Instead, I think this would work:

If you have downgraded glibc packages from 2.11.1 to 2.9, do this:

Code:
cd /lib
rm lib*-2.11.1*
ldconfig
sln ld-2.9.so ld-linux.so.2
rm ld-2.11.1.so
sln is a statically linked command for making symbolic links (like ln -s)!

Last edited by Petri Kaukasoina; 03-11-2010 at 08:33 AM.
 
3 members found this post helpful.
Old 03-11-2010, 04:14 PM   #23
fuzzbawl
LQ Newbie
 
Registered: Mar 2010
Location: Indiana, US
Distribution: Slackware, CentOS
Posts: 4

Rep: Reputation: 0
Post #22 seems to resolve the issue for me. Thanks for tracking this down! I forgot about ld linking to the newest library it finds.
 
Old 03-11-2010, 06:39 PM   #24
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
dive had the right idea on profile....so even tho you have solved it try this for your locales

Code:
export LANGUAGE=en_US.UTF-8 
export LC_ALL=en_US.UTF-8
 
  


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
Do you use stable or current? ~sHyLoCk~ Slackware 54 08-30-2014 04:30 AM
Getting -current from -stable? Nylex Slackware 1 08-28-2009 12:41 AM
from slackware -current to -stable jrecortel Slackware 4 07-26-2009 08:06 AM
which slackware current distro is stable masand Slackware 10 01-19-2005 02:52 AM
FreeBSD 4.10-STABLE vs. 5.2.1-CURRENT entob *BSD 3 09-01-2004 03:30 PM

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

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