Unable to yum install anything on RHEL
Asked Answered
M

6

14

I am on a new RHEL system.

I seem to be unable to be able to install anything package via yum install.

yum install nmap

The current repos in

ls /etc/yum.repos.d/
google-chrome.repo  redhat.repo         rhel-source.repo

What could be going wrong ?

OUTPUT OF YUM INSTALL:

$ sudo yum install nmap
[sudo] password for user: 
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
No package nmap available.
Error: Nothing to do
Mulhouse answered 13/9, 2012 at 9:13 Comment(2)
Do you recieve any error? What makes you say "it seems you are unable to install via yum" ?Parley
I have updated my post with the output of the install. This is the same output I get regardless of the package mentionedMulhouse
T
12

Centos has done it for you.

Create a repo file in /etc/yum.repos.d as

vi /etc/yum.repos.d/myrepo.repo

Then paste this in this file:

[centos]
name=CentOS-7
baseurl=http://ftp.heanet.ie/pub/centos/7/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://ftp.heanet.ie/pub/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

Saving it with wq! now run

yum repolist

Check if you can install any package (say nmap)

yum install nmap -y

Enjoy!!!

Tarpon answered 26/3, 2018 at 5:47 Comment(8)
Thank you @Tarpon Sir. Been struggling with this for a while.Meemeece
Thank you!!!! Anyone facing issues connecting to satellite server or RHEL login issues - this is the way to go.Discus
The question is about RHEL. I don't think using a CentOS repo will be the solution here.Recipience
Right. That's why I have mentioned 'Centos has done it for you' in the very first line. This is basically work around to get the problem solved when you are out of opting for RHEL subscription.Tarpon
Thank you for this fix! I've been bouncing from thread to thread. This is what I needed.Dunderhead
You can use the command - "microdnf install yum" Have a look at #58908155Bignoniaceous
didnt work. I am using RHEL 9.1 want to install nfs-utils (along with its dependencies). Any help?Nathanialnathaniel
great work-around. I stopped subscribing to redhat a while back.Trunk
M
11

Red Hat doesn't use the /etc/yum.repos.d directory for official packages so the answer won't be in there. It will use the subscription plugin placed in /etc/yum/pluginconf.d.

You mentioned that the RHEL host is new. You will need to make sure your subscription is valid or yum will fail silently.

You can use the subscription-manager list command to gain info regarding subscriptions.

Mesozoic answered 19/10, 2012 at 20:10 Comment(1)
this is exactly why i prefer centos to redhat... subscriptions are just one more thing to look after that were a hassle in RHEL 6 series with the classic/etc changes. ugh.Outlast
P
1

Try "searching" for the correct package name in the reps by using yum list

yum list nmap

I guess the correct package name and install command is:

yum install nmap.x86_64

You can also do a "yum search somename"

Parley answered 13/9, 2012 at 10:37 Comment(0)
D
1

In my case, I was trying to install OpenJDK using yum; sudo yum install -y java-1.8.0-openjdk-devel but received an error message stating that a dependency was unavailable:

---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.201.b09-1.el6_10 will be installed
--> Processing Dependency: pcsc-lite-devel(x86-64) for package: 1:java-1.8.0-openjdk-headless-1.8.0.201.b09-1.el6_10.x86_64
--> Finished Dependency Resolution
Error: Package: 1:java-1.8.0-openjdk-headless-1.8.0.201.b09-1.el6_10.x86_64 (rhel-6-server-rpms)
           Requires: pcsc-lite-devel(x86-64)
**********************************************************************
yum can be configured to try to resolve such errors by temporarily enabling
disabled repos and searching for missing dependencies.
To enable this functionality please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf
**********************************************************************

I resolved this by following the suggestion please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf and then ran the yum command again. This time yum loaded a bunch of [previously disabled] repos and searched through them, finally reporting success and this message:

*******************************************************************
Dependency resolving was successful thanks to enabling these repositories:
rhel-6-server-optional-rpms
*******************************************************************

So there was no ignored *-devel repo, but still doing this worked. For clearance, the explicitly ignored repos are: ignored_repos=*debug-rpms *source-rpms *beta-rpms

..so that worked, but I'm still no wiser on the mechanics of this..

Denysedenzil answered 28/2, 2019 at 14:52 Comment(0)
S
0

If you have OS image in your lab or any location you can try this for some RPMS

vim /etc/yum.repos.d/rhel.repo
[rhel]
name=rhel
baseurl=http://172.25.5.25/osimages/rhel7.2_64bit
enabled=1
gpgcheck=0

Then do yum clean all

baseurl is the location where your OS image is available. No subscription is needed, it is reusing your OS image

Selfsuggestion answered 28/4, 2017 at 9:58 Comment(0)
B
0

Try installing using:

yum install nmap-frontend

It worked for me on Red Hat Enterprise Linux Server release 7.7 (Maipo)

You can use the following line to test:

nmap 25 gmail-smtp-in.l.google.com
Borowski answered 18/2, 2020 at 13:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.