免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 9796 | 回复: 0
打印 上一主题 下一主题

No module named yum [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-04 15:37 |只看该作者 |倒序浏览
No module named yum

#####################################################
今天突然想用yum升级个软件包,发现yum没有安装,下了yum2.4的包,安装后发现yum不能用


[root@mysqls3 ~]# yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.3.4 (#1, Nov  4 2004, 14:06:56)
[GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://wiki.linux.duke.edu/YumFaq


看了http://wiki.linux.duke.edu/YumFaq

安装libxml2-python, python-sqlite, or python-elementtree package 三个包包以为问题解决,结果却还是出现No module named yum。

faq如下:
Q. 7: I installed a new version of yum (or upgraded my whole system) and now when I run yum, I get an error saying "The yum libraries do not seem to be available on your system for this version of python" and "Please make sure the package you used to install yum was built for your install of python." What's wrong with the yum package I've got, or my Python installation, and how do I fix it?

A.

In pre-2.3.? yum This error message is often misleading. To see the real error, run python from the command line, and type import yum. The problem probably isn't with your version of python at all, but with a missing libxml2-python, python-sqlite, or python-elementtree package.

Yum 2.4.x provides a different error with the module import errors, so this will become less confusing.

It also includes a directive to send the error to the mailing list. Really, you should figure out what rpm provides the module that was missing and try to install that.

If you are getting a message that yum itself is the missing module then you probably installed it incorreclty (or installed the source rpm using make/make install). If possible, find a prebuilt rpm that will work for your system like one from Fedora or CentOS. Or, you can download the srpm and do a

rpmbuild --rebuild yum*.src.rpm

Q. 8: Yum is very nice at updating my kernel, but I use the (nvidia | openafs | other module) and yum doesn't seem to handle it well. Could you fix yum to handle this for me?

A. This is a known and non-trivial problem, but people are talking and working on it. Please read ideas on [WWW] this plugin and messages from [WWW] the Google search of the yum archives to get more details.


###################################################
直接用安装盘里的rpm包
[root@mysqls3 ~]# ls /mnt/CentOS/RPMS/y
yelp-2.6.4-2.i386.rpm
ypbind-1.17.2-13.i386.rpm
ypserv-2.13-18.i386.rpm
yp-tools-2.8-7.i386.rpm
yum-2.4.3-4.el4.centos.noarch.rpm
yum-metadata-parser-1.0-8.el4.centos.i386.rpm

[root@mysqls3 ~]# rpm -ivh  /mnt/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm
warning: /mnt/CentOS/RPMS/yum-2.4.3-4.el4.centos.noarch.rpm: V3 DSA signature: NOKEY, key ID 443e1821
error: Failed dependencies:
        urlgrabber is needed by yum-2.4.3-4.el4.centos.noarch
        yum-metadata-parser is needed by yum-2.4.3-4.el4.centos.noarch
        yumconf is needed by yum-2.4.3-4.el4.centos.noarch

先安装了 yum-metadata-parser-1.0-8.el4.centos.i386.rpm

其余的依赖关系如下:

urlgrabber的依赖是这个包 python-urlgrabber-2.9.8-2.noarch.rpm
yumconf 的依赖关系就是  centos-yumconf-4-4.5.noarch.rpm

却发现需要安装一个在源安装盘里不存在的包的依赖关系(centos-yumconf),这个不存在的包还真是麻烦,没安装就会出  No module named yum,真是服气centos了让我从s390里找出来centos-yumconf的包来装,解决了此问题。


http://mirror.be10.com/centos/4. ... nf-4-4.5.noarch.rpm

centos-yumconf-4-4.5.noarch.rpm.tar

10 KB, 下载次数: 620

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP