In my CentOS 7, the yum is malfunctioned. I want to reinstall it. However, my "rpm" version is too low to reinstall yum? How can I upgrade rpm on CentOS 7? Thanks. NOTE: I logged in as a root. And all these are done on a cluster, not personal computer. Here are what I have done and the message I received.
rpm -U rpm-apidocs-4.11.3-40.el7.noarch
package rpm-apidocs-4.11.3-40.el7.noarch is already installed # not surprised because I have upgraded it
rpm -Uvh yum-3.4.3-163.el7.centos.noarch.rpm
error: Failed dependencies:
rpm >= 0:4.11.3-22 is needed by yum-3.4.3-163.el7.centos.noarch
rpm --prefix="/usr/bin/" -U rpm-apidocs-4.11.3-40.el7.noarch.rpm
error: package rpm-apidocs is not relocatable
Is it possible for me to install all dependencies together, like one command can install all dependencies and the package? I sincerely appreciate your time. rpm -Uvh yum-3.4.3-163.el7.centos.noarch.rpm error: Failed dependencies: rpm >= 0:4.11.3-22 is needed by yum-3.4.3-163.el7.centos.noarch
rpm -U rpm-4.11.3-40.el7.x86_64.rpm
error: Failed dependencies:
rpm = 4.11.3-21.el7 is needed by (installed) rpm-libs-4.11.3-21.el7.x86_64
rpm = 4.11.3-21.el7 is needed by (installed) rpm-python-4.11.3-21.el7.x86_64
rpm = 4.11.3-21.el7 is needed by (installed) rpm-devel-4.11.3-21.el7.x86_64
rpm = 4.11.3-21.el7 is needed by (installed) rpm-build-4.11.3-21.el7.x86_64
rpm -U rpm-libs-4.11.3-40.el7.x86_64.rpm
error: Failed dependencies:
rpm = 4.11.3-40.el7 is needed by rpm-libs-4.11.3-40.el7.x86_64
rpm-libs(x86-64) = 4.11.3-21.el7 is needed by (installed) rpm-build-libs-4.11.3-21.el7.x86_64
rpm-libs(x86-64) = 4.11.3-21.el7 is needed by (installed) rpm-devel-4.11.3-21.el7.x86_64
================================================================================
rpm -qR rpm-4.11
package rpm-4.11 is not installed
rpm -i http://mirror.alpha-labs.net/centos/7/os/x86_64/Packages/rpm-4.11.3-40.el7.x86_64.rpm
file /bin/rpm from install of rpm-4.11.3-40.el7.x86_64 conflicts with file from package rpm-4.11.3-21.el7.x86_64
file /usr/bin/rpm2cpio from install of rpm-4.11.3-40.el7.x86_64 conflicts with file from package rpm-4.11.3-21.el7.x86_64
file /usr/bin/rpmdb from install of rpm-4.11.3-40.el7.x86_64 conflicts with file from package rpm-4.11.3-21.el7.x86_64
file /usr/bin/rpmkeys from install of rpm-4.11.3-40.el7.x86_64 conflicts with file from package rpm-4.11.3-21.el7.x86_64
file /usr/lib/rpm/rpmpopt-4.11.3 from install of rpm-4.11.3-40.el7.x86_64 conflicts with file from package rpm-4.11.3-21.el7.x86_64
file /usr/share/man/man8/rpm.8.gz from install of rpm-4.11.3-40.el7.x86_64 conflicts with file from package rpm-4.11.3-21.el7.x86_64
rpm -iUvh http://mirror.alpha-labs.net/centos/7/os/x86_64/Packages/rpm-4.11.3-40.el7.x86_64.rpm
Retrieving http://mirror.alpha-labs.net/centos/7/os/x86_64/Packages/rpm-4.11.3-40.el7.x86_64.rpm
error: Failed dependencies:
rpm = 4.11.3-21.el7 is needed by (installed) rpm-libs-4.11.3-21.el7.x86_64
rpm = 4.11.3-21.el7 is needed by (installed) rpm-python-4.11.3-21.el7.x86_64
rpm = 4.11.3-21.el7 is needed by (installed) rpm-devel-4.11.3-21.el7.x86_64
rpm = 4.11.3-21.el7 is needed by (installed) rpm-build-4.11.3-21.el7.x86_64
Download the last version of rpm
from CentOS 7 and update it:
rpm -U rpm-version......
then download yum packages and update it on the same way
The package you need to update is rpm
not rpm-apidocs
. Here is one mirror of this package: http://mirror.alpha-labs.net/centos/7/os/x86_64/Packages/rpm-4.11.3-40.el7.x86_64.rpm
To get list of dependencies you can use command:
rpm -qR rpm-version....
and install them on this way:
rpm -i pkg1 pkg2 pkg3
You do not need to download them, rpm
understand http protocol so you can install on this way:
rpm -i http://mirror.alpha-labs.net/centos/7/os/x86_64/Packages/rpm-4.11.3-40.el7.x86_64.rpm
The update will be line like this one:
rpm -Uvh http://mirror.alpha-labs.net/centos/7/os/x86_64/Packages/rpm-4.11.3-40.el7.x86_64.rpm \
http://mirror.alpha-labs.net/centos/7/os/x86_64/Packages/rpm-libs-4.11.3-21.el7.x86_64.rpm \
http://mirror.alpha-labs.net/centos/7/os/x86_64/Packages/rpm-python-4.11.3-21.el7.x86_64.rpm \
http://mirror.alpha-labs.net/centos/7/os/x86_64/Packages/rpm-devel-4.11.3-21.el7.x86_64.rpm \
http://mirror.alpha-labs.net/centos/7/os/x86_64/Packages/rpm-build-4.11.3-21.el7.x86_64.rpm
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments