Welcome 微信登录

首页 / 操作系统 / Linux / RedHat Linux用rpmdb和yum解决依赖问题

用rpmdb和yum解决依赖问题在rhel5当中取消了rpmdb包(其实在fc4中就已经取消了),rpmdb主要是解决在安装包时的依赖关系。通过以下方法可以查看究竟有没有安装rpmdb包。[root@linux RPMS]# rpm -qa|grep rpmdb
rpmdb-RedHat-4-0.20050107
如何运用rpmdb来解决依赖关系呢?比如安装as4自带的apache时有很多依赖需要解决,如:[root@linux RPMS]# rpm -ivh httpd-2.0.52-9.ent.i386.rpm                                         
warning: httpd-2.0.52-9.ent.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e  
error: Failed dependencies:                                                                                        
        httpd-suexec is needed by httpd-2.0.52-9.ent.i386                                            
    Suggested resolutions:                                                                                           
        httpd-suexec-2.0.52-9.ent.i386.rpm
报错需要安装依赖包。用rpmdb工具自动解决依赖的方法是先执行rpm -ivh rpmdb*.rpm,然后在安装其他软件包时加上--aid的参数。[root@linux RPMS]# rpm -ivh --aid httpd-2.0.52-9.ent.i386.rpm                                      
warning: httpd-2.0.52-9.ent.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e     
Preparing...                ########################################### [100%]    
   1:httpd                  ########################################### [ 50%]        
   2:httpd-suexec           ########################################### [100%]
安装完成了。现在没有rpmdb工具,可以使用新的yum工具来完成。组件包的安装都是通过yum来完成的,所以要对yum进行配置。具体在命令行下操作如下:1. mount -o loop rhel-5-server-dvd.iso /media/rhel2. vi /etc/yum.repos.d/rhel-local.repo[Cluster]
name=Red Hat Enterprise Linux $releasever - $basearch - Cluster
baseurl=file:///media/rhel/Cluster
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[ClusterStorage]
name=Red Hat Enterprise Linux $releasever - $basearch - ClusterStorage
baseurl=file:///media/rhel/ClusterStorage
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[Server]
name=Red Hat Enterprise Linux $releasever - $basearch - Server
baseurl=file:///media/rhel/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[VT]
name=Red Hat Enterprise Linux $releasever - $basearch - VT
baseurl=file:///media/rhel/VT
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release3. mkdir -p /var/rhel/{Cluster,ClusterStorage,Server,VT}4. createrepo -o /var/rhel/Cluster -g /media/rhel/Cluster/repodata/comps-rhel5-cluster.xml /media/rhel/Cluster
   createrepo -o /var/rhel/ClusterStorage -g /media/rhel/ClusterStorage/repodata/comps-rhel5-cluster-st.xml /media/rhel/ClusterStorage
   createrepo -o /var/rhel/Server -g /media/rhel/Server/repodata/comps-rhel5-server-core.xml /media/rhel/Server
   createrepo -o /var/rhel/VT -g /media/rhel/VT/repodata/comps-rhel5-vt.xml /media/rhel/VT5. mount --bind /var/rhel/Cluster/repodata /media/rhel/Cluster/repodata   mount --bind /var/rhel/ClusterStorage/repodata /media/rhel/ClusterStorage/repodata
   mount --bind /var/rhel/Server/repodata /media/rhel/Server/repodata
   mount --bind /var/rhel/VT/repodata /media/rhel/VT/repodata6. yum clean allRedHat 5安装Vmware-tools故障解决Ubuntu 10.04使用体验相关资讯      redhat 
  • 为什么像 RedHat 那样的开源旗手很  (12/23/2014 07:50:53)
  • 红帽目录服务RHDS(Red Hat   (11/28/2012 19:14:22)
  • RedHat 6 配置网卡team  (09/28/2012 18:52:50)
  • RedHat Linux 用户登录认证失败  (06/24/2014 19:56:55)
  • Red Hat Enterprise Linux 5.8日志  (09/29/2012 11:41:27)
  • Red Hat Enterprise Linux 5---  (09/12/2012 17:10:35)
本文评论 查看全部评论 (0)
表情: 姓名: 字数