Linux
Centos Authconf 錯誤
我目前正在嘗試使用以下命令在 centos 上進行身份驗證和授權:
authconfig --enableforcelegacy --update
它向我拋出了以下消息,因為我對 linux 還很陌生,所以我目前有點努力找出我必須做的事情:`Traceback (most recent call last): File "/sbin/authconfig", line 1071, in <module> sys.exit(module.run()) File "/sbin/authconfig", line 640, in run self.parseOptions() File "/sbin/authconfig", line 128, in parseOptions help=_("enable shadowed passwords by default")) File "/usr/lib64/python2.7/gettext.py", line 571, in lgettext return ldgettext(_current_domain, message) File "/usr/lib64/python2.7/gettext.py", line 543, in ldgettext return t.lgettext(message) File "/usr/lib64/python2.7/gettext.py", line 368, in lgettext return tmsg.encode(locale.getpreferredencoding()) UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 12: ordinal not in range(128)
以前有沒有人遇到過類似的問題?您能否與我分享您是如何解決的?非常感謝您!
我能夠使用以下命令修復它:
export LC_ALL=C
我從一個類似的案例中找到了它:https ://stackoverflow.com/questions/14547631/python-locale-error-unsupported-locale-setting