Whenever we want to use command yum install <packagename>   get error:

No package available

For example,

[pastacode lang=”bash” manual=”%5Broot%40cpanel1%20etc%5D%23%20yum%20install%20autossh%0ALoaded%20plugins%3A%20fastestmirror%0ALoading%20mirror%20speeds%20from%20cached%20hostfile%0A%20*%20base%3A%20centos.t-2.net%0A%20*%20extras%3A%20centos.t-2.net%0A%20*%20updates%3A%20centos.t-2.net%0ANo%20package%20autossh%20available.%0AError%3A%20Nothing%20to%20do%0A%5Broot%40cpanel1%20etc%5D%23%20%0A” message=”bash code” highlight=”” provider=”manual”/] [ad type=”banner”]

How do we make it work?

These steps might help you,

  1. yum clean all & yum clean metadata
  2. Check the files in /etc/yum.repos.d and make sure that they don’t all have enabled = 0 for each repo (there may be more than one per file).
  3. Finally you would be able to do yum update and search for desired packages.

  • For CentOS/RHEL 7, autossh is no longer available in Repoforge repository. So you will need to build and compile it from the source, here is what you should do:[pastacode lang=”bash” manual=”%24%20sudo%20yum%20install%20wget%20gcc%20make%0A%24%20wget%20http%3A%2F%2Fwww.harding.motd.ca%2Fautossh%2Fautossh-1.4e.tgz%0A%24%20tar%20-xf%20autossh-1.4e.tgz%0A%24%20cd%20autossh-1.4e%0A%24%20.%2Fconfigure%0A%24%20make%0A%24%20sudo%20make%20install%0A” message=”bash code” highlight=”” provider=”manual”/] [ad type=”banner”]

Categorized in: