Chinaunix首页 | 论坛 | 博客
  • 博客访问: 386684
  • 博文数量: 112
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 800
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-29 13:41
文章分类

全部博文(112)

文章存档

2020年(1)

2018年(10)

2017年(27)

2016年(18)

2015年(31)

2014年(25)

分类: LINUX

2014-10-14 15:12:21

一、安装篇    
  下载下载yum软件并安装
    wget      tar zxvf yum_forAS4.tar.gz
yum_forAS4/
yum_forAS4/CentOS-Base.repo
yum_forAS4/python-elementtree-1.2.6-7.el4.rf.i386.rpm
yum_forAS4/python-urlgrabber-2.9.7-1.2.el4.rf.noarch.rpm
yum_forAS4/yum-2.4.2-0.4.el4.rf.noarch.rpm
yum_forAS4/sqlite-2.8.16-1.2.el4.rf.i386.rpm
yum_forAS4/python-sqlite-1.0.1-1.2.el4.rf.i386.rpm
    cd yum_forAS4
    rpm -ivh *.rpm
    cp CentOS-Base.repo /etc/yum.repos.d/
    执行如下命令导入GPG Key
    rpm --import -CentOS-4
   CentOS-Base.repo这里默认的 已经不存在YUM源,将地址改为即可。
   wget CentOS-Base.repo

    yum安装完毕(以上是针对32位系统的安装)。

二、问题篇
      1、 系统问题,输入yum提示:
    
 There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
 /usr/lib/python2.3/site-packages/cElementTree.so: cannot open shared object file: No such file or directory
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, Feb 18 2008, 17:16:53) 
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)]
If you cannot solve this problem yourself, please go to 
the yum faq at:

   问题是之前安装的python-elementtree-1.2.6-7.el4.rf.i386.rpm包是针对32位操作系统的;
   安装python-elementtree-1.2.6-7.el4.rf.x86_64.rpm即可;下载地址如下:
html

     2、python版本问题,
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.6.1 (r261:67515, Aug 7 2010, 11:36:17)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]
If you cannot solve this problem yourself, please go to
the yum faq at:
 
      错误原因:错误信息描述为 yum 所依赖的python 不相符;
     查找yum文件,并编辑此py文件


             which yum

             /usr/bin/yum

             vi /usr/bin/yum

             将#!/usr/bin/python改为#!/usr/bin/python2.3,保存;(补充:yum基于python写的)。









     
阅读(1018) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~