Today I have a strange problem in my RHEL system. My python script is returning:
>>> locale.setlocale(locale.LC_ALL, '') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.6/locale.py", line 513, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting
WHEN I LAUNCH ...
$ locale
Conclusion...
locale: Cannot set LC_ALL to default locale: No such file or directory LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" ...
I tried many suggestions, but none of them solved my problem.
For instance:
- Reinstall glibc-common.
- Export LC_ALL as an environment variable in ~ / .bashrc.
- Change the file / etc / sysconfig / i 18n '.
- locale-gen does not exist in RHEL.
Does anyone have a good suggestion to solve my problem. Remembering that I am using RHEL and not Ubuntu (there are many tutorials on language issues and Ubuntu).
source share