Package already installed but rpm -q shows not installed

rhel7rpmyum

I have installed package python2-urllib3-1.10.2-7.el7.noarch on my RHEL 7.7 server using yum:

yum install python2-urllib3

and it is successfully installed.

now when I run rpm -q python2-urllib3 it shows me the package is not installed. how to know where is the issue and fix it please.

below is a snapshot for the output:
output

Best Answer

The "issue" is in the way you're referring to the package name and the specific package you're dealing with.

When you run yum install python2-urllib3:

  • python2-urllib3 is not an actual package name, it is a capability
  • python-urllib3 is the actual package name

So while you can pass a package capability to yum, for the rpm you need to pass a package name. That is why it rightfully tells you that there is no such package installed as python2-urllib3.

If you pass the real package name to it, as in python-urllib3, you will get the expected results.

Related Topic