zoukankan      html  css  js  c++  java
  • 指定YUM安装包的体系结构或版本

    在单一体系结构下同时安装32位和64位包
    echo ‘multilib_policy=all’ >> /etc/yum.conf

    指定体系结构

    查看当前系统体系结构
    [root@oracle ~]# uname -ar
    Linux oracle 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64

    GNU/Linux

    查看系统当前安装的iptables包
    [root@oracle ~]# rpm -q iptables
    iptables-1.4.7-5.1.el6_2.x86_64

    使用YUM在64位环境下指定安装iptables的32位包
    [root@oracle ~]# yum install iptables.i686
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
    * base: mirrors.163.com
    * extras: mirrors.163.com
    * updates: mirrors.163.com
    Setting up Install Process
    Resolving Dependencies
    –> Running transaction check
    —> Package iptables.i686 0:1.4.7-5.1.el6_2 will be installed
    –> Finished Dependency Resolution

    Dependencies Resolved

    =================================================================================================
    Package Arch Version Repository Size
    =================================================================================================
    Installing:
    iptables i686 1.4.7-5.1.el6_2 base 241 k

    Transaction Summary
    =================================================================================================
    Install 1 Package(s)

    Total download size: 241 k
    Installed size: 702 k
    Is this ok [y/N]:

    指定版本

    查看当前安装版本
    [root@oracle ~]# rpm -q cups
    cups-1.4.2-48.el6_3.1.x86_64

    查看是否有新版本及版本号
    [root@oracle ~]# yum update |grep cups
    —> Package cups.x86_64 1:1.4.2-48.el6_3.1 will be updated
    —> Package cups.x86_64 1:1.4.2-48.el6_3.3 will be an update
    —> Package cups-libs.x86_64 1:1.4.2-48.el6_3.1 will be updated
    —> Package cups-libs.x86_64 1:1.4.2-48.el6_3.3 will be an update
    cups x86_64 1:1.4.2-48.el6_3.3 updates 2.3 M
    cups-libs x86_64 1:1.4.2-48.el6_3.3 updates 316 k

    [root@oracle ~]#

    安装指定版本
    [root@oracle ~]# yum install cups-1.4.2-48.el6_3.3
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
    * base: mirrors.163.com
    * extras: mirrors.163.com
    * updates: mirrors.163.com
    Setting up Install Process
    Resolving Dependencies
    –> Running transaction check
    —> Package cups.x86_64 1:1.4.2-48.el6_3.1 will be updated
    —> Package cups.x86_64 1:1.4.2-48.el6_3.3 will be an update
    –> Processing Dependency: cups-libs = 1:1.4.2-48.el6_3.3 for package: 1:cups-1.4.2-48.el6_3.3.x86_64
    –> Running transaction check
    —> Package cups-libs.x86_64 1:1.4.2-48.el6_3.1 will be updated
    —> Package cups-libs.x86_64 1:1.4.2-48.el6_3.3 will be an update
    –> Finished Dependency Resolution

    Dependencies Resolved

    =================================================================================================
    Package Arch Version Repository Size
    =================================================================================================
    Updating:
    cups x86_64 1:1.4.2-48.el6_3.3 updates 2.3 M
    Updating for dependencies:
    cups-libs x86_64 1:1.4.2-48.el6_3.3 updates 316 k

    Transaction Summary
    =================================================================================================
    Upgrade 2 Package(s)

    Total download size: 2.6 M
    Is this ok [y/N]:

    yum安装指定版本软件

    比如依赖libssl.so.0.9.8

    01 [root@ares modules]# yum provides */libssl.so.0*                  
    02 Loaded plugins: fastestmirror
    03 Loading mirror speeds from cached hostfile
    04  * base: mirrors.aliyun.com
    05  * epel: ftp.sjtu.edu.cn
    06  * extras: mirrors.aliyun.com
    07  * remi: remi.kazukioishi.net
    08  * updates: mirrors.skyshe.cn
    09 openssl098e-0.9.8e-18.el6_5.2.i686 : A compatibility version of a general cryptography and TLS library
    10 Repo        : base
    11 Matched from:
    12 Filename    : /usr/lib/libssl.so.0.9.8e
    13  
    14  
    15  
    16 openssl098e-0.9.8e-18.el6_5.2.x86_64 : A compatibility version of a general cryptography and TLS library
    17 Repo        : base
    18 Matched from:
    19 Filename    : /usr/lib64/libssl.so.0.9.8e
    20  
    21  
    22  
    23 openssl098e-0.9.8e-18.el6_5.2.i686 : A compatibility version of a general cryptography and TLS library
    24 Repo        : installed
    25 Matched from:
    26 Filename    : /usr/lib/libssl.so.0.9.8e

    然后

    [root@ares modules]# yum install openssl098e-0.9.8e-18.el6_5.2.i686

    参考:

    https://www.centos.org/forums/viewtopic.php?t=22243

  • 相关阅读:
    查看mysql版本的四种方法及常用命令
    newInstance和new的区别(good)
    Citrix 服务器虚拟化之六 Xenserver虚拟机创建与快照
    Java实现 蓝桥杯 算法训练 排序
    Java实现 蓝桥杯 算法训练 排序
    Java实现 蓝桥杯 算法训练 排序
    Java实现 蓝桥杯 算法训练 2的次幂表示
    Java实现 蓝桥杯 算法训练 2的次幂表示
    Java实现 蓝桥杯 算法训练 前缀表达式
    Java实现 蓝桥杯 算法训练 前缀表达式
  • 原文地址:https://www.cnblogs.com/zdxster/p/5344348.html
Copyright © 2011-2022 走看看