others-Why can't I install some software even if my yum repo is the latest version?

1. The purpose of this post

Sometimes, even if our yum repository is the latest version , we still can not install some software , just like this:

For example, if we want to install nginx, we run this command:

yum install nginx

But we get this result:

No package nginx available.
Error: Nothing to do

2. Environments

  • Linux

3. Solution

3.1 Update your yum

Before we going further, we should update our yum to the latest version:

yum update

And try again to install nginx. If this does not work, just continue

3.2 Remove and reinstall the epel repo of yum

First, remove the epel repo from yum

yum remove epel-release

Then , install epel repo again:

yum install epel-release

And try again to install nginx. If this does not work, just continue

3.3 Check your yum plugins

According to yum documents:

Yum provides plug-ins that extend and enhance its operations. Certain plug-ins are installed by default. Yum always informs you which plug-ins, if any, are loaded and active whenever you call any yum command

Let’s check our plugins:

yum info yum

We get this:

Loaded plugins: fastestmirror

And according to yum documents on how to enable/disable plugins:

To enable Yum plug-ins, ensure that a line beginning with plugins= is present in the [main] section of /etc/yum.conf, and that its value is 1: You can disable all plug-ins by changing this line to plugins=0.

So we can edit the file /etc/yum.conf,and change like this:

#plugins=1
plugins=0

Then retry to yum install nginx, it should be done.

6. Conclusion

Sometimes, yum plugins can intercept your yum process, so if you encounter some problem, you can try to disable the plugins and retry.