Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN cannot set LC_CTYPE locale

Tags:

svn

locale

I started getting the following error whenever i use SVN in my server:

svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LC_CTYPE is UTF-8
svn: warning: please check that your locale name is correct

my guess is that there might be something wrong with my svn client(Using Versions App) and the server svn...

how can i make this warning disappear forever from the server whenever i use such commands?

like image 654
stergosz Avatar asked Jul 02 '12 20:07

stergosz


6 Answers

Although setting LC_CTYPE to an empty value worked for me, the underlying reason was that the app Terminal on my Mac was setting the locales on startup, even when I SSH to another system.

This can be fixed in Terminal > Preferences:

  • Select "Profiles" tab and select “Advanced” from sub-tabs
  • Uncheck "Set locale environment variables on startup"
like image 40
Andreas K Avatar answered Nov 17 '22 09:11

Andreas K


Check the output of

locale -a

If the locale that SVN is complaining about isn't installed, then you can install it.

You might need to do for Debian or similar systems:

sudo dpkg-reconfigure locales

If you want to configure locales manually:

sudo vim /etc/locale.gen # and add "en_US.UTF-8 UTF-8"
sudo locale-gen

Or if your locale-gen supports an argument (NOT for Debian):

sudo locale-gen en_GB.UTF-8
sudo locale-gen en_US.UTF-8

Alternatively as Ankit writes in his answer:

export LC_ALL=C

may work (in your current session, or in your .profile).

like image 199
JeeBee Avatar answered Nov 17 '22 10:11

JeeBee


If you want to fix this, set the “LC_ALL” variable manually.

To make it permanent just edit the file “/etc/environment” and add the line:

LC_ALL=C

Save the file and exit the editor. In order for it to apply you have to logout of the current shell session. The next time you log in, the issue with SVN will be gone.

like image 29
Ankit Avatar answered Nov 17 '22 10:11

Ankit


LC_ALL and LANG settings did not work for me but LC_CTYPE did.

LC_CTYPE=en_US.UTF-8
like image 15
Caner Avatar answered Nov 17 '22 09:11

Caner


On Debian Jessie:

I ran:

sudo dpkg-reconfigure locales

Added and installed the missing locale. Then it worked.

like image 9
LaGrandMere Avatar answered Nov 17 '22 09:11

LaGrandMere


commenting out the lines with SendEnv LANG LC_* in /etc/ssh/ssh_config helps to me (openSUSE)

like image 3
Subdigger Avatar answered Nov 17 '22 10:11

Subdigger