[SOLVED] Reverted to 13 stable from -current and got a problem with locales
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
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?
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:
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"
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:
-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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.