yum提示字符编码错误
1、问题描述:
[root@localhost data]# yum
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
You need to give some command
Traceback (most recent call last):
File "/usr/bin/yum", line , in <module>
yummain.user_main(sys.argv[:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line , in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line , in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line , in getOptionsConfig
self.parseCommands() # before we return check over the base command + args
File "/usr/share/yum-cli/cli.py", line , in parseCommands
self.usage()
File "/usr/share/yum-cli/cli.py", line , in usage
sys.stdout.write(self.optparser.format_help())
File "/usr/lib64/python2.6/optparse.py", line , in format_help
result.append(self.get_usage() + "\n")
File "/usr/lib64/python2.6/optparse.py", line , in get_usage
self.expand_prog_name(self.usage))
File "/usr/lib64/python2.6/optparse.py", line , in format_usage
return _("Usage: %s\n") % usage
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128)
2、解决方法:
一、
#yum clean all
#rm -f /var/lib/rpm/__db*
#rpm --rebuilddb
#yum update 二、
# vim /etc/yum.conf
找到下面一行:
plugins= #替换为plugins=0 三、
# vim fastestmirror.conf
enabled=1 #替换为enabled=0 这步貌似可以忽略
3、参考网址:
http://www.cnblogs.com/sunss/archive/2010/07/27/1786235.html
yum提示字符编码错误的更多相关文章
- 初始化mysql数据库时提示字符编码错误的解决办法
有时候在安装完数据库并初始化的时候会出现如下错误: root@localhost mysql-5.5.19]# bash scripts/mysql_install_db --user=mysql - ...
- 火狐firefox提示“内容编码错误 无法显示您尝试查看的页面,因为它使用了无效或者不支持的压缩格式。”
火狐firefox浏览器打开网也是时提示“内容编码错误 无法显示您尝试查看的页面,因为它使用了无效或者不支持的压缩格式.” 今早一来打开用PHPCMS做的网站时就提示这个错误,用其他浏览器打开提示的是 ...
- Linux yum提示Loaded plugins错误的解决方法
yum是Linux软件包管理器,也叫yum源,在yum使用过程中,有时会出现Loaded plugins错误,重启无效,遇到这种情况该如何解决呢?下面就给大家介绍下Linux yum提示Loaded ...
- pycharm 字符编码错误处理
如果在MySQL创建表空间时指定了他的字符集为utf8 但是插入数据后 在pycharm查看却出现字符乱码 怎么解决呢 ? 首先进入cmd 页面 输入 chcp 65001 (意思是指定cmd所有字 ...
- python3字符编码错误
在3.x 这里返回的是bytes-like类型, 所以这里不需要释放编码 ,释放也没有意义, 而是应该encode 转换成我们需要的编码, 之所会造成类型错误,原因是就在这里. 他们返回的类型不一样, ...
- RT-thread 利用Scons 工具编译提示python编码错误解决办法
错误信息: scons: Reading SConscript files ...UnicodeDecodeError: 'ascii' codec can't decode byte 0xbd in ...
- 从网站上复制代码到MyEclipse后每行都是字符编码错误的解决办法
注意图中的工具栏的按钮:Show Whitespace Characters(Window->Preferences->General->Editors->Text Edito ...
- python2 pip安装包等出现各种编码错误UnicodeDecodeError: 'ascii'(/或者utf-8) codec can't decode byte 0xd2...
1.问题描述: python2环境,pip安装包时报错UnicodeDecodeError: 'ascii'(/或者utf-8) codec can't decode byte 0xd2... 类似如 ...
- CentOS 使用yum命令安装出现错误提示”could not retrieve mirrorlist http://mirrorlist.centos.org
CentOS 使用yum命令安装出现错误提示"could not retrieve mirrorlist http://mirrorlist.centos.org这个错误, 在网上找了好多, ...
随机推荐
- Mustache 使用总结
前言: 在分析 jeesite 项目的时候,看到了 Mustache,于是查了下 正文: 1.Mustache 概述 Mustache 是基于 JavaScript 实现的模板引擎,即用来 渲染前台页 ...
- git初体验(六)git配置
一.基本配置 看这篇Git 基本配置其实就解决很多问题了. 二.客户端配置 1.git bash 粘贴与编辑 在git bash客户端头部右键,现在属性,然后把"快速编辑模式勾选即可&quo ...
- 用C#制作推箱子小游戏
思路分析: 一.制作一个地图 二.地图中放置墙.箱子.人.目标等 三.让小人动起来完成推箱子动作 游戏制作: 1.按照上述地图制作一个地图 (12行×13列) 地图可以看做是行和列组成的,即可以看做 ...
- js json 对象相互转换
字符串转对象(strJSON代表json字符串) var obj = eval(strJSON); var obj = strJSON.parseJSON(); var obj = JSO ...
- 【BZOJ-1046】上升序列 DP + 贪心
1046: [HAOI2007]上升序列 Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 3723 Solved: 1271[Submit][Stat ...
- 【bzoj1922】 Sdoi2010—大陆争霸
http://www.lydsy.com/JudgeOnline/problem.php?id=1922 (题目链接) 题意 一张无向图,每个节点被k个节点保护,想要走到一个节点当且仅当它不被保护.你 ...
- codeforces 723B:Text Document Analysis
Description Modern text editors usually show some information regarding the document being edited. F ...
- python 集合、函数和文件操作
1.set集合 set集合是一个无序.不可重复.可嵌套的序列,基本功能是进行成员关系测试和删除重复元素,可以使用大括号({})或者 set()函数创建集合,注意:创建一个空集合必须用 set() 而不 ...
- POJ 3468 A Simple Problem with Integers(线段树/区间更新)
题目链接: 传送门 A Simple Problem with Integers Time Limit: 5000MS Memory Limit: 131072K Description Yo ...
- CTO、技术总监、首席架构师的区别
2016年11月30日13:22:26[转] CTO.技术总监.首席架构师的区别 提升自已的能力,比如专业技术,行业发展趋势,技术发展趋势,协调能力,组织能力,管理能力等[技术总监] 需要从技术总监和 ...