semanage command fails with unsupported locale setting in RHEL 5.4

Solution Verified - Updated -

Issue

  • The following command fails intermittently:
[root@]# /usr/sbin/semanage login -a -s remotesupport_u -r s0-s0:c0.c1023 remote
Traceback (most recent call last):
  File "/usr/sbin/semanage", line 33, in ?
    sys.stderr = codecs.getwriter(locale.getpreferredencoding())(sys.__stderr__, 'replace')
  File "/usr/lib/python2.4/locale.py", line 417, in getpreferredencoding
    setlocale(LC_CTYPE, "")
  File "/usr/lib/python2.4/locale.py", line 381, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

Environment

  • Red Hat Enterprise Linux (RHEL) 5.4
  • policycoreutils < policycoreutils-1.33.12-14.8.el5_9

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In