问题描述
- linux下yum install mod_ssl –y 出错
-
在linux下用yum安装apache
[root@lamp5403 www]# yum install mod_ssl –y
Cluster | 1.3 kB 00:00Cluster/primary | 6.0 kB 00:00
Cluster 32/32
ClusterStorage | 1.3 kB 00:00ClusterStorage/primary | 7.5 kB 00:00
ClusterStorage 36/36
Server | 1.3 kB 00:00Server/primary | 845 kB 00:00
Server 3040/3040
VT | 1.3 kB 00:00VT/primary | 20 kB 00:00
VT 72/72
rhel-debuginfo | 1.3 kB 00:00rhel-debuginfo/primary | 845 kB 00:00
rhel-debuginfo 3040/3040
Setting up Install Process
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 309, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 178, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 349, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 181, in doCommand
return base.installPkgs(extcmds)
File "/usr/share/yum-cli/cli.py", line 583, in installPkgs
self.install(pattern=arg)
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 2617, in install
mypkgs = self.returnPackagesByDep(arg)
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 2334, in returnPackagesByDep
sack = self.whatProvides(depname, depflags, depver)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 170, in whatProvides
pkgs = self.pkgSack.searchProvides(name)
File "/usr/lib/python2.4/site-packages/yum/packageSack.py", line 339, in searchProvides
return self._computeAggregateListResult("searchProvides", name)
File "/usr/lib/python2.4/site-packages/yum/packageSack.py", line 482, in _computeAggregateListResult
sackResult = apply(method, args)
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 1017, in searchProvides
return self.searchPrco(name, "provides")
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 44, in newFunc
return func(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 945, in searchPrco
executeSQL(cur, "select DISTINCT pkgKey from %s where name %s ?" % (prcotype,querytype), (name,))
File "/usr/lib/python2.4/site-packages/yum/sqlutils.py", line 150, in executeSQLPyFormat
return cursor.execute(q, p)
File "/usr/lib64/python2.4/site-packages/sqlite/main.py", line 249, in execute
parms = (self._unicodeConvert(parms[0]),)
File "/usr/lib64/python2.4/site-packages/sqlite/main.py", line 217, in _unicodeConvert
converted_obj[k] = v.encode(*self.con.encoding)
UnicodeEncodeError: 'ascii' codec can't encode character u'ufffd' in position 0: ordinal not in range(128)使用了yum clean all 还是不行
解决方案
字符编码有问题,这个源的包有问题吧。
解决方案二:
我重装了/python2.4,字符编码查了 也没有问题 错误提示的还是一样。。。
解决方案三:
字符编码有问题,换一个下载源试试
解决方案四:
Linux Study之--yum install错误