因为redhat中的yum是收费的,未注册时不允许使用的,下面是挂载光盘后的情况,未挂载是没有yum命令。但是下面即便挂载了也是需要验证的

[root@localhost /]# yum install openssl
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Nothing to do

所以最好是去使用centos的yum源,免费的。

推文:https://blog.csdn.net/yingfengjia520/article/details/54866007

推文:RedHat6使用CentOS yum源 换yum

安装步骤:

一:查看原来的yum源,删除原有yum源

rpm -aq | grep yum    #查看
rpm -aq | grep yum|xargs rpm -e --nodeps    #删除

二:下载centos的yum安装包

这里使用网易的yum源即可,快些

http://mirrors.163.com/centos/6/os/x86_64/Packages/  #修改前面的6可以修改centos版本  注意(x86_64是64位系统,i386是32位)

安装yum源的相关依赖包

http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

yum源包

http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-updateonboot-1.1.30-40.el6.noarch.rpm
http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-utils-1.1.30-40.el6.noarch.rpm

注意:在上面yum源包中yum=metadata-parser是需要系统版本要求,需要64位,这里我们的系统是32位,会出现错误

error: Failed dependencies:
        libc.so.6()(64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64
        libc.so.6(GLIBC_2.2.5)(64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64
        libglib-2.0.so.0()(64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64
        libpthread.so.0()(64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64
        libpython2.6.so.1.0()(64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64
        libsqlite3.so.0()(64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64
        libxml2.so.2()(64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64
        libxml2.so.2(LIBXML2_2.4.30)(64bit) is needed by yum-metadata-parser-1.1.2-16.el6.x86_64
错误原因:版本不符

相关文章:

  • 2021-08-07
  • 2021-11-09
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
猜你喜欢
  • 2021-08-19
  • 2021-11-06
  • 2021-11-27
  • 2021-05-18
  • 2022-12-23
  • 2021-11-27
  • 2018-04-18
相关资源
相似解决方案