Centos系统下载大全 | Redhat系统下载大全 | Windows2012系统下载大全 | Windows2008系统下载大全| CMS教程 | 网站地图 51运维网-专注Linux/Unix系统安全运维!
当前位置:51运维网 > 系统 > CentOS问题 > 正文

yum出现的“UnicodeDecodeError: 'ascii' codec”问题解决

时间:2016-06-29 18:57 来源:网络整理 作者:linux系统 阅读:

 

yum出现的“UnicodeDecodeError: 'ascii' codec”问题解决

 

 

问题

新装了CentOS 6.5系统,打算使用yum安装程序是出现了如下错误:

Loading mirror speeds from cached hostfile
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 136, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 434, in doCommands
    self._getTs(needTsRemove)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
    self._getTsInfo(remove_only)
  File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
    pkgSack = self.pkgSack
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 887, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 669, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 279, in populateSack
    self.doSetup()
  File "/usr/lib/python2.6/site-packages/yum/repos.py", line 105, in doSetup
    self.ayum.plugins.run('postreposetup')
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/fastestmirror.py", line 197, in postreposetup_hook
    if downgrade_ftp and _len_non_ftp(repo.urls) == 1:
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 699, in <lambda>
    urls = property(fget=lambda self: self._geturls(),
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 696, in _geturls
    self._baseurlSetup()
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 648, in _baseurlSetup
    self.mirrorurls = self._replace_and_check_url(mirrorurls)
  File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 691, in _replace_and_check_url
    print 'YumRepo Error: All mirror URLs are not using ftp, http[s] or file.\n Eg. %s' % misc.to_utf8(skipped)
  File "/usr/lib64/python2.6/codecs.py", line 351, in write
    data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xbc in position 3746: ordinal not in range(128)

解决方案

依次执行以下操作:

cd /var/lib/rpm/

rm -i __db.*

yum clean all

yum history new

 


 

 

感谢您对【51运维网 http://www.51ou.com/】的支持,我们为您免费提供《yum出现的“UnicodeDecodeError: 'ascii' codec”问题解决》技术文章,《yum出现的“UnicodeDecodeError: 'ascii' codec”问题解决》详细使用和说明,有时《yum出现的“UnicodeDecodeError: 'ascii' codec”问题解决》可能不完善、敬请谅解!如果《yum出现的“UnicodeDecodeError: 'ascii' codec”问题解决》有错误请给我们留言,我们将尽快修复文章错误,如果您觉得本站不错,请分享给周围的朋友!谢谢!

顶一下
(0)
0%
踩一下
(0)
0%
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
验证码:点击我更换图片