Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test of locals fix failed #50

Closed
linuxgeneral opened this issue Sep 13, 2010 · 4 comments
Closed

Test of locals fix failed #50

linuxgeneral opened this issue Sep 13, 2010 · 4 comments

Comments

@linuxgeneral
Copy link

I just ran another install without my edit to ssh_config and locals failed this is the console output.

Do you want to proceed with the install? [Y/n] y
==> Mon Sep 13 08:44:54 UTC 2010 INFO: Clean up temp files in /var/opt/ ==> Mon Sep 13 08:44:58 UTC 2010 INFO: Update apt sources ==> Mon Sep 13 08:45:02 UTC 2010 INFO: Add apt sources for MariaDB OK
==> Mon Sep 13 08:45:07 UTC 2010 INFO: Run apt update, please wait... ==> aptitude update: Succeeded. ==> aptitude clean: Succeeded. \perl: warning: Setting locale failed. perl: warning: Please check that your locale settings:

LANGUAGE = "en_US.UTF-8",
LC_ALL = "en_US.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").
|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_ALL to default locale: No such file or directory

@linuxgeneral
Copy link
Author

From issue 48

@linuxgeneral By the way, is the stackscript with AcceptEnv still required? I didn't notice that problem before, but maybe we can fix that directly in Barracuda?
Comment
@linuxgeneral By the way, is the stackscript with AcceptEnv still required? I didn't notice that problem before, but maybe we can fix that directly in Barracuda?
or cancel
linuxgeneral about an hour ago | link | edit | delete

Yes, and its linode specific. Here is the ticket I opened on the issue included below.

locale problem with Debian 5
[230735] locale problem with Debian 5 Status CLOSED
Opened On 2010-08-10 05:37:10 PM by joedevita
Last Updated On 2010-08-11 12:17:30 PM by sschwertly
Closed On 2010-08-11 12:17:30 PM
Regarding Linode COM
Description There seems to be a problem with the Debian Image

I continue to get errors like:

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_ALL to default locale: No such file or directory

And:

perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

One hack is to set it at the prompt with:

apt-get update && apt-get install locales
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

I can not see how to do this with a stack script because of the dpkg-reconfigure UI.

can you fix your image or provide a stack script to fix on deployment?
Update by psandin
2010-08-10 05:46:58 PM Hello,

Thank you for bringing this issue to our attention. I have forwarded this request to our build team to include the locales package in future Debian images. Another fix if you are working only in English locales, is to comment out the "AcceptEnv LANG LC_*" line in your sshd configuration. If you have any further questions or feedback please let us know.

--Peter Update by joedevita
2010-08-11 11:58:27 AM Thank you Peter,
Here is the code I use to take care of this
Debian locales fix by Joe DeVita

echo "Now fixing locales by commenting out AcceptEnv LANG LC* in sshd_config"
echo "This fix is recommended if you are working only in English locales"
sed -i 's/AcceptEnv LANG LC/#AcceptEnv LANG LC_/g' /etc/ssh/sshd_config
touch /tmp/restart-ssh
restartServices

@omega8cc
Copy link
Owner

Latest updated version of script introduces fully tested fix for all locales related issues. You shouldn't use any system tweaks now. The only issue is: Lenny 32bit still has other problems, while Lenny 64bit works, Lucid 32bit works (and 64bit probably, but not tested today yet).

@linuxgeneral
Copy link
Author

Today i installed on Lenny 64bit.

The fix works for Barracuda and Octopus gave me the same error on a fresh install only when i ran the script from a ssh login at my Ubuntu workstation.

I traced the problem to the ssh client changing this environment variable. I commented out SendEnv LANG LC_* in /etc/ssh/ssh_config on my local workstation logged out-in and octopus ran without error.

Allow client to pass locale environment variables

AcceptEnv LANG LC_*

Linode Lenny 64bit has this setting as default in /etc/sshd_config

Allow client to pass locale environment variables

AcceptEnv LANG LC_*

if you comment this out and restart ssh, you stall have to log out and back in.

Note:
The linode web console does not have this problem.

It looks like you have to trap this in the Octopus installer as well

@omega8cc
Copy link
Owner

It was tested now many times and works for me w/o issues when logged via another server or from my Mac standard terminal. However there can be a problem when your ssh client forces different locale. It is now properly commented in the installer on-screen warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants