Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there any way of fixing once and for all the problem mentioned here: http://www.thomas-krenn.com/de/wiki/Perl_warning_Setting_locale_failed_unter_Debian

I keep fixing it by doing

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales

But whenever I reboot, the error starts happening again. It's a Ubuntu 11.04 VPS

share|improve this question

1 Answer 1

Whenever you login via SSH, your locale (the one on the machine your are connecting from) is sent to the server. I assume, you have de_DE.UTF-8 set locally. Whenever you execute the code snippet from Hetzner while you are logged in on the machine you temporarily switch to a different LC and everything works (for a while).

First off look in /etc/default/locale. You should find a LANG="en_US.UTF-8" in there (if not, add it).

I would recommend to install your locale on the server. Try choosing any de_DE.* in the dpkg-reconfigure locales dialog..

Or you could append the export commands (not the other commands!) into your ~/.bashrc on the server, so they will be set automatically whenever you login.

Or you could disable accepting LC_* and LANG variables on you SSH server (and your server should fallback to it's default). Therefore remove them from - or uncomment the whole - AcceptEnv in /etc/ssh/sshd_config.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.