yummain.py install yum 不能运行的原因 yummai

系统 4105 0

[root@akinlau ~] wget   http://tel.mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-8.el6.noarch.rpm

[root@akinlau ~] wget   http://tel.mirrors.163.com/centos/6/os/x86_64/Packages/python-pycurl-7.19.0-8.el6.x86_64.rpm

[root@akinlau ~] wget   http://tel.mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

[root@akinlau ~] rpm -ivh python-urlgrabber-3.9.1-8.el6.noarch.rpm python-pycurl-7.19.0-8.el6.x86_64.rpm yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

如果不安装python-urlgrabber,python-pycurl,yum-metadata-parser这3个包的话,在下面运行./yummain.py install yum的话会报以下错误:

报错如下

如果上述rpm连接失效,请到这里去一个一个的找: http://rpm.pbone.net/

报错1: [root@akinlau yum-3.4.3]# ./yummain.py  Traceback (most recent call last): File “./yummain.py”, line 28, in <module> from yum import Errors File “/root/nagios/yum-3.4.3/yum/__init__.py”, line 52, in <module> import config File “/root/nagios/yum-3.4.3/yum/config.py”, line 30, in <module> from parser import ConfigPreProcessor, varReplace File “/root/nagios/yum-3.4.3/yum/parser.py”, line 4, in <module> import urlgrabber ImportError: No module named urlgrabber

 

报错2: [root@akinlau yum-3.4.3]# ./yummain.py  Traceback (most recent call last): File “./yummain.py”, line 28, in <module> from yum import Errors File “/root/nagios/yum-3.4.3/yum/__init__.py”, line 55, in <module> import rpmsack File “/root/nagios/yum-3.4.3/yum/rpmsack.py”, line 38, in <module> import yum.depsolve File “/root/nagios/yum-3.4.3/yum/depsolve.py”, line 30, in <module> from transactioninfo import TransactionMember File “/root/nagios/yum-3.4.3/yum/transactioninfo.py”, line 32, in <module> from sqlitesack import YumAvailablePackageSqlite File “/root/nagios/yum-3.4.3/yum/sqlitesack.py”, line 26, in <module> import yumRepo File “/root/nagios/yum-3.4.3/yum/yumRepo.py”, line 33, in <module> import sqlitecachec ImportError: No module named sqlitecachec

创建yum配置文件

[root@akinlau ~] touch /etc/yum.conf

 

注:如果不创建yum.conf的话,下面运行./yummain.py install yum的话会报以下错误:

 

[root@akinlau yum-3.4.3]# ./yummain.py  CRITICAL:yum.cli:Config Error: Error accessing file for config   file:///etc/yum.conf

下载yum源码包并安装

[root@akinlau ~] wget   http://yum.baseurl.org/download/3.4/yum-3.4.3.tar.gz

解压源码包[root@akinlau ~] tar zxvf yum-3.4.3.tar.gz

编译安装yum[root@akinlau ~] cd yum-3.4.3

[root@akinlau yum-3.4.3] ./yummain.py install yum

base                                                         | 3.7 kB     00:00   

base/primary_db                                              | 4.5 MB     00:07   

extras                                                       | 3.5 kB     00:00   

extras/primary_db                                            |  23 kB     00:03

出现以上提示就证明yum已经安装成功了。

 

本文转自: 风转云溪 之 yummain.py install yum 不能运行的原因 yummain.py not found博文

yummain.py install yum 不能运行的原因 yummain.py not found


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论