Rpmdb and yum are used to solve the dependency problem. In rhel5, The rpmdb package is canceled (in fact, it has been canceled in fc4). rpmdb mainly solves the dependency during the installation package. Use the following method to check whether the rpmdb package is installed. [Root @ linuxRPMS] # rpm-qa | how does the greprpmdbrpmdb-RedHat-4-0.20050107 use rpmdb to solve dependencies? For example, when you install apache that comes with as4
Use rpmdb and yum to solve dependency problems
The rpmdb package has been canceled in rhel5 (in fact, it has been canceled in fc4). rpmdb mainly solves the dependency during the installation package.
Use the following method to check whether the rpmdb package is installed.
[Root @ linux RPMS] # rpm-qa | grep rpmdb
Rpmdb-RedHat-4-0.20050107
How can we use rpmdb to solve dependencies? For example, when installing apache that comes with as4, there are many dependencies to solve, such:
[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
Install the dependency package when an error is reported. The rpmdb tool automatically solves the dependency by executing rpm-ivh rpmdb *. rpm,
Add the -- aid parameter when installing other software packages.
[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%]
The installation is complete.
Now there is no rpmdb tool, and you can use the new yum tool.
The installation of the component package is completed through yum, so you need to configure yum.
Perform the following operations on the command line:
1. mount-o loop rhel-5-server-dvd.iso/media/rhel
2. 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-release
3. 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/VT
5. 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/repodata
6. yum clean all