Reputation: 5860
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?
Upvotes: 65
Views: 75510
Reputation: 530
For anyone else stuck with SVN, here's the fix for RHEL/CentOS/Rocky Linux 8.x:
On the SVN server, make sure the glibc-langpack-en
package is installed.
If your clients come to the table with more exotic locales, I guess the relevant package for those languages will be needed as well.
Upvotes: 0
Reputation: 17556
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).
Upvotes: 69
Reputation: 825
Adding just one more option that worked for me on a RHEL6 system.
/etc/sysconfig/i18n
contained LANG="en_US.UTF-8"
but locale -a | grep -i en_us
showed en_US.utf8
.
After updating /etc/sysconfig/i18n
to match the output of locale -a
the problem was resolved.
Upvotes: 0
Reputation: 1
I got the issue when I connect to a remote ssh server (ssh is used by svnserve -> svn update command).
The reason is that the remote server does not have the language pack available which is set in $LANG on the local server.
You can check the installed language packs by 'locale -a'. The $LANG language must be configured on the remote server.
E.g.
Local server: LANG=en_US.UTF-8
Remote server: locale -a -> only de_DE.UTF-8 is available
Resolution: Just install missing language pack on remote server: dpkg-reconfigure locales;
btw: the selected default language does not matter.
Upvotes: 0
Reputation: 727
For iTerm2:
Profiles → Open Profiles… → Edit Profiles… → Terminal → Unckeck Set locale variables automatically
Upvotes: 1
Reputation: 590
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:
Upvotes: 49
Reputation: 3682
We had this problem in our company as well, when using IntelliJ. A colleague of mine just fixed it.
For us the problem was the line SendEnv LANG LC_*
in /etc/ssh/ssh_config
. When I commented out that line, everything worked fine.
Upvotes: 1
Reputation: 10379
On Debian Jessie:
I ran:
sudo dpkg-reconfigure locales
Added and installed the missing locale. Then it worked.
Upvotes: 9
Reputation: 2203
commenting out the lines with SendEnv LANG LC_*
in /etc/ssh/ssh_config helps to me (openSUSE)
Upvotes: 3
Reputation: 151
This is caused by not having the proper locales generated on your system.
Uncommented lines that you want to support in /etc/locale.gen
For example:
en_GB.UTF-8 UTF-8
en_US.UTF-8 UTF-8
ru_RU.UTF-8 UTF-8
and then run sudo locale-gen
Upvotes: 2
Reputation: 13046
I found that combining several answers hear yields correct behavior.
This depends on what kinds of file names you have in your source tree. For example, I have english, hebrew and arabic. en_US.UTF-8 works for me "C" on it's own led to files which I couldn't update.
Upvotes: 0
Reputation: 329
LC_ALL and LANG settings did not work for me but LC_CTYPE did.
LC_CTYPE=en_US.UTF-8
Upvotes: 15
Reputation: 910
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.
Upvotes: 28