NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
OSwimmer
Nov 04, 2011Follower
SSH locale
Hello,
Recently I bought a Readynas Ultra 6 (Radiator 4.2.19). One of the most interesting features is the ability to customize it yourself (it's a debian lenny).
So my first add-on to install was EnableSSH.
Each time I connect with SSH to my Readynas I got the message 'locale: Cannot set LC_CTYPE to default locale: No such file or directory'
It's a very annoying error because the output of most commands on ssh gave also errors about the locale.
When I trigger the locales on the system (locale -a) I've got a list of locales that are also available in the web interface (and C and POSIX as addition)
A 'dpkg-reconfigure locales' doesn't solve the problem because the command 'localedef' cannot be found on the system.
Does somebody know how to solve this issue?
OSwimmer
Recently I bought a Readynas Ultra 6 (Radiator 4.2.19). One of the most interesting features is the ability to customize it yourself (it's a debian lenny).
So my first add-on to install was EnableSSH.
Each time I connect with SSH to my Readynas I got the message 'locale: Cannot set LC_CTYPE to default locale: No such file or directory'
It's a very annoying error because the output of most commands on ssh gave also errors about the locale.
When I trigger the locales on the system (locale -a) I've got a list of locales that are also available in the web interface (and C and POSIX as addition)
A 'dpkg-reconfigure locales' doesn't solve the problem because the command 'localedef' cannot be found on the system.
Does somebody know how to solve this issue?
OSwimmer
13 Replies
Replies have been turned off for this discussion
- MindBenderAspirantMy Pro 6 has this problem too, also on two previous Raidiator version. Before that it wasn't a problem. It seems to cause difficulties for svnserver as well. Perhaps they just forgot to configure locale, but I'd like to see it fixed too.
- MindBenderAspirant*bump*
- Same problem on my Ultra 4, RAIDiator 4.2.19.
dpkg -L libc6 says that it should include /usr/bin/localedef, but the file just isn't there, and I'm not sure of any way to reinstall libc6.
I reinstalled RAIDiator a while back after trying to fix this problem and making it worse, so I'm hesitant to fiddle too much...
Would really love to find a way to sort out this annoyance if anyone can offer advice...?
Some possibly relevant extra info about my system...
binaries in /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin matching 'locale*'
/usr/bin/locale*
/usr/sbin/locale-gen*
Relevant looking environment variables:
LANG=en_AU.UTF-8
LC_CTYPE=en_AU.UTF-8
Locale -a output:% 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
POSIX
in the /usr/share/locale directory:
af/ ca/ da/ de_DE/ en_GB/ es_ES/ fi/ gl/ hu/ it/ ko/ nl/ pl/ pt_PT/ sk/ sv/ tr/ zh_CN/
bg/ cs/ de/ dz/ eo/ es_PE/ fr/ he/ hu_HU/ ja/ nb/ nn/ pt/ ro/ sl/ te/ uk/ zh_TW/
bs/ cy/ de_CH/ el/ es/ eu/ fr_FR/ hr/ id/ km/ ne/ pa/ pt_BR/ ru/ sq/ tl/ vi/
Oddly there is no en_US or en_AU, let alone 'en_XX.UTF-8' directories. The only "en*" directory here is "en_GB".
non-comments in /etc/locale.gen% grep -v ^# /etc/locale.gen
en_US.UTF-8 UTF-8
de_DE.UTF-8 UTF-8
ja_JP.UTF-8 UTF-8
ko_KR.UTF-8 UTF-8
nl_NL.UTF-8 UTF-8
zh_CN.UTF-8 UTF-8
zh_TW.UTF-8 UTF-8 - mdgm-ntgrNETGEAR Employee RetiredIt's Debian etch not Lenny.
Can you try 4.2.20 beta?: http://www.readynas.com/forum/viewtopic.php?f=51&t=57193 - MindBenderAspirantI usually see it when I start my subversion server:
I'm mostly worried about name preservation.
tritium:~# /opt/rfw/bin/svnserve -dr /opt/subversion/
svnserve: warning: cannot set LC_CTYPE locale
svnserve: warning: environment variable LC_CTYPE is UTF-8
svnserve: warning: please check that your locale name is correct
(ReadyNAS Pro 6, RAIDiator 4.2.19, clients running Mac OS, Windows and Linux) mdgm wrote: Can you try 4.2.20 beta?: http://www.readynas.com/forum/viewtopic.php?f=51&t=57193
This has fixed a small issue, that I suspect was (partially) my own fault, in that the few locales provided are back:% 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
POSIX
de_DE.utf8
en_US.utf8
ja_JP.utf8
ko_KR.utf8
nl_NL.utf8
zh_CN.utf8
zh_TW.utf8
But /usr/bin/localedef is still not present (despite dpkg -L libc6 still saying it should be there).
Incidentally, I think this is what originally removed most of the above locales for me (locale-gen was able to remove, but not regenerate them due to lack of localedef).
If I change my local env variables, before I ssh into my ReadyNAS to something like this:
LANG=en_US.utf8
LC_CTYPE=en_US.utf8
then the locale errors (or warnings?) go away.
I guess to some extent, the workaround for users is to
a) use one of the 7 supported locales (changing env variables before you log in if necessary)
b) never run locale-gen (because it deletes the old locales in /usr/lib/locale/locale-archive before checking if it can recreate them!)
And it seems to me a bug that
a) there are only 7 supported locales (at the very least, the common english ones could be aliased?)
b) /usr/bin/locale-gen is provided (from the locales dpkg) without its dependency, /usr/bin/localedef (from the libc6 dpkg)
Furthermore, a *lot* of the files listed in dpkg -L libc6 and dpkg -L locales are missing (86 and 544 files respectively).
I won't list them all here, but you can easily get a list by running:
ls `dpkg -L libc6` > /dev/null
ls `dpkg -L locales` > /dev/null
(any missing files will cause ls to print an error to stderr on screen, while the actual files just get printed to /dev/null)
In fact the same applies for a lot of the base system packages, no doubt to save on space... but with a 4GB root partition with only 17% usage (at least on my Ultra 4) this seems highly unnecessary.- sventunusAspirantHi guys,
I'd like to bump this one again...
Just did a factory default of my ReadyNAS Ultra 6, activated the EnableSSHRootLogin add-on, ssh'ed in and got the locales error.
Went ahead and tried to generate the locales... only to find out what's being described in this thread.
Now the 7 default locales are missing and I have no means of generating them again.
I'm running RAIDiator 4.2.21, so upgrading to get those locales back is not an option.
I have no data on the NAS yet, so I can perform the factory default again if I really really need to, but I'm really hoping that won't be necessary.
Please tell me there is a way around this, or - even better - how we can get the locale-gen binary on the x86 to get the system to actually behave like it should :-/
Really frustrating to fail before I actually even got started tweaking my RN :-( - sventunusAspirantWell, still no solution it seems, so i factory defaulted again :-(
I now take the workaround making sure my locale it set up to be one of the 7 supported locales by the ReadyNAS before ssh'ing in, but is no one able to provide a solution for this issue?
No one from the Jedi Council either?
I consider being able to generate correct locales a pretty basic thing in Linux, have a hard time understanding why this should be such an issue on a ReadyNAS Ultra. After all, it is a pretty high-end device, no?
Please someone provide some feedback on this issue.
Thanks! - MindBenderAspirantI brought this to ReadyNAS support attention, but they gave me the 11 irrelevant questions list (again), so I gave up. No more Netgear next time.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!