菜鸟的小总结,升级CentOS到5.3

首先,感慨下,太难了。这件事绝对不是菜鸟所能应付的.我花了一整天的时间才慢慢的弄好.悲哀啊悲哀.
再次向那些伟大的前辈以及google和百度致敬,是你们帮我解决了问题。
问题一:

Server refused to allocate pty

解决方案

/sbin/MAKEDEV tty
/sbin/MAKEDEV pty
这里要注意,因为ssh你无法登陆,但是却可以用WinSCP登陆
为了避免同样的问题发生
可以把上面的代码加到
/etc/init.d/sshd 文件里面

问题二:

Loaded plugins: fastestmirror
error: no dbpath has been set
error: cannot open Packages database in /%{_dbpath}
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 229, in user_main
errcode = main(args)
File “/usr/share/yum-cli/yummain.py”, line 84, in main
base.getOptionsConfig(args)
File “/usr/share/yum-cli/cli.py”, line 184, in getOptionsConfig
enabled_plugins=self.optparser._splitArg(opts.enableplugins))
File “/usr/lib/python2.4/site-packages/yum/__init__.py”, line 191, in _getConfig
self._conf = config.readMainConfig(startupconf)
File “/usr/lib/python2.4/site-packages/yum/config.py”, line 754, in readMainConfig
yumvars[‘releasever’] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File “/usr/lib/python2.4/site-packages/yum/config.py”, line 824, in _getsysver
idx = ts.dbMatch(‘provides’, distroverpkg)
TypeError: rpmdb open failed

解决方法

#rm /dev/urandom
#mknod -m 644 /dev/urandom c 1 9

问题三

File “/usr/bin/yum”, line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
File “/usr/share/yum-cli/yummain.py”, line 229, in user_main
File “/usr/share/yum-cli/yummain.py”, line 84, in main
File “/usr/share/yum-cli/cli.py”, line 184, in getOptionsConfig
enabled_plugins=self.optparser._splitArg(opts.enableplugins))
File “/usr/lib/python2.5/site-packages/yum/__init__.py”, line 189, in _getConfig
startupconf.pluginconfpath,disabled_plugins,enabled_plugins)
File “/usr/lib/python2.5/site-packages/yum/__init__.py”, line 355, in doPluginSetup
plugin_types, confpath, disabled_plugins, enabled_plugins)
File “/usr/lib/python2.5/site-packages/yum/plugins.py”, line 152, in __init__
self._importplugins(types)
File “/usr/lib/python2.5/site-packages/yum/plugins.py”, line 195, in _importplugins
self._loadplugin(modulefile, types)
File “/usr/lib/python2.5/site-packages/yum/plugins.py”, line 251, in _loadplugin
module = imp.load_module(modname, fp, pathname, description)
File “/usr/lib/yum-plugins/filter-data.py”, line 111
(‘committers’, ‘committer’)]
[martin@localhost ~]$ yum
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 229, in user_main
File “/usr/share/yum-cli/yummain.py”, line 84, in main
File “/usr/share/yum-cli/cli.py”, line 184, in getOptionsConfig
enabled_plugins=self.optparser._splitArg(opts.enableplugins))
File “/usr/lib/python2.5/site-packages/yum/__init__.py”, line 189, in _getConfig
startupconf.pluginconfpath,disabled_plugins,enabled_plugins)
File “/usr/lib/python2.5/site-packages/yum/__init__.py”, line 355, in doPluginSetup
plugin_types, confpath, disabled_plugins, enabled_plugins)
File “/usr/lib/python2.5/site-packages/yum/plugins.py”, line 152, in __init__
self._importplugins(types)
File “/usr/lib/python2.5/site-packages/yum/plugins.py”, line 195, in _importplugins
self._loadplugin(modulefile, types)
File “/usr/lib/python2.5/site-packages/yum/plugins.py”, line 251, in _loadplugin
module = imp.load_module(modname, fp, pathname, description)
File “/usr/lib/yum-plugins/filter-data.py”, line 111
(‘committers’, ‘committer’)]
SyntaxError: invalid syntax

解决方法:

编辑/etc/yum.conf 文件 然后设置 plugins 的参数为 0.

Author: Lei

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.