Skip to content

Instantly share code, notes, and snippets.

@smallvil
Created October 25, 2013 04:50
Show Gist options
  • Save smallvil/7149559 to your computer and use it in GitHub Desktop.
Save smallvil/7149559 to your computer and use it in GitHub Desktop.
rhel6.4 yum error
########################################################################################
# issue
########################################################################################
#LOCALE ko_KR.utf8 error
#LOCALE C pass
#LOCALE ja_JP.utf8 error
#LOCALE en_US.utf8 pass
[root@rhel6 ~]#yum
/* Load어쩌구 생략 */
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 285, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 105, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 310, in getOptionsConfig
self.parseCommands() # before we return check over the base command + args
File "/usr/share/yum-cli/cli.py", line 333, in parseCommands
self.usage()
File "/usr/share/yum-cli/cli.py", line 1340, in usage
sys.stdout.write(self.optparser.format_help())
File "/usr/lib64/python2.6/optparse.py", line 1641, in format_help
result.append(self.get_usage() + "\n")
File "/usr/lib64/python2.6/optparse.py", line 1583, in get_usage
self.expand_prog_name(self.usage))
File "/usr/lib64/python2.6/optparse.py", line 374, in format_usage
return _("Usage: %s\n") % usage
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128)
########################################################################################
# solve
########################################################################################
vim /root/.bashrc
alias yum='LANG=C /usr/bin/yum'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment