4

I'm trying to install this RPM locally via yum and am greeted with just a "Error: Nothing to do" message.

Full stdout

Loaded plugins: fastestmirror, priorities
Setting up Install Process
Examining Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64.rpm: Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64
Error: Nothing to do

I'm at a loss for even the right question to ask at this point. How can I identify the problem and get this installed?

3
  • 2
    What is the command are you running (full command line)? Normally you would install RPM's using the rpm command, not yum.
    – user87664
    Jan 14, 2015 at 17:41
  • sudo yum install Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64.rpm
    – atxdba
    Jan 14, 2015 at 17:43
  • What do rpm -qp Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64.rpm and rpm -q Percona-Server-server say? Jan 15, 2015 at 13:26

6 Answers 6

-5

You should be using the rpm command to install, and including the full URL to the RPM.

Example (assuming install from the website in question and no other dependencies):

sudo rpm -Uvh http://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.22-71.0/binary/redhat/6/x86_64/Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64.rpm

2
  • 4
    No, use the package manager!!! Oct 3, 2015 at 11:43
  • Indeed, yum install can be used on the RPM's URL and it's a better option (see answer below). Oct 9, 2017 at 22:06
5

I didn't realise until I added -v to my yum invocation, but sometimes packages are ignored because you or someone else has written a matching wildcard in an exclude directive in /etc/yum.conf.

e.g.

exclude=Percona-Server*

It's probably not wise to just remove this without finding out why it's there but, in my case, it was a holdover from the past and removing it solved the problem.

1
3

You can install/activate the percona repo with

yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm

Now you can use yum install Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64.rpm to install the wanted package (and keep it up2date with yum)

1
2
+50

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.

1

The reason for Nothing to do message in case of release packages is simple: it's either already installed or you're using an outdated URL which installed older version of the release package.

Release packages contain YUM repository information. You typically install a release package first (using URL), then install the packages of interest from that repository (using package name).

So if a *-release package is already installed, then there's really nothing to do and nothing you should do about it. You have to proceed to install the packages from that repository.

Complete steps:

yum install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm 
yum install Percona-Server-server-56 

First command adds repository information, can give "nothing to do" in case it's already present (that's OK).

The second command installs the actual package from the repository.

0

Alternative solution:

Download the rpm from http://repo.percona.com/testing/centos/7/RPMS/x86_64/

Manually install the rpm

sudo rpm -i Percona-Server-server-56-5.6.22-rel71.0.el6.x86_64.rpm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .