YUM installer UnicodedecodeError

yum Installer Times Exception UnicodeDecodeError

Traceback (most recent call last):
File "/usr/bin/ yum", line 29, in
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 219, in main
return_code = base.doTransaction( )
File "/usr/share/yum-cli/cli.py", line 586, in doTransaction
resultobject = self.runTransaction(cb=cb)
File "/usr/lib /python2.6/site-packages/yum/__init__.py", line 1505, in runTransaction
self._store_config_in_history()
File "/usr/lib/python2.6/site-packages/yum /__init__.py", line 5230, in _store_config_in_history
myrepos += repo.dump()
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 395, in dump
output = output +'%s = %s '% (attr, res)
UnicodeDecodeError:'ascii' codec can't d ecode byte 0xe2 in position 497: ordinal not in range(128)

solution

1. Create a new python file

vi /usr/lib/python2.6/site-packages/sitecustomize.py

2. File content

import sys 

sys.setdefaultencoding('UTF-8')

3. Reinstallation, problem solved

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5552 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.