If YUM is refusing to install a package it is probably because:
- a) The package has dependencies that are not available
- b) The package has a conflict with a package with is already installed
- c) YUM has old data and needs it's cache cleared (
yum clean headers
)
Yum will normally give some good guidance on what the problem is, if there is one, but sometimes it will return "Nothing to do"!
First check that the package is not already installed. In this instance you will need to connect to MySQL (mysql -u root -p
) and then check the version (SHOW VARIABLES LIKE "version";
). For many packages you can simply run httpd -v
or nginx -v
etc etc.
If the package is not installed already, or a lower version is installed, then you should normally be able to install or update.
When creating a RPM a spec
file lists which packages and versions are required for the package to be installed. Reading this 'spec' file is the best way to fully understand what is required and to do so you will normally have to find the source RPM aka SRPM.
CentOS provide some great guidance on rebuilding a SRPM in order to inspect or customize it: Rebuild a Source RPM
Within the spec file you will probably find both Requires
and BuildRequires
, pay close attention to these as they are the dependencies the package requires. Another configuration that is often overlooked is the "Epoch". The Epoch number allows old packages to be replaced by different names where their version numbers are lower than the installed version. This is important for packages that change names but is often added in.
I am guessing that when YUM returns Error: Nothing to do
the Epoch number is the issue.
rpm
command, notyum
.rpm -qp Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64.rpm
andrpm -q Percona-Server-server
say?