0

I am trying to figure out what RPM provided /usr/bin/java. However, I think this may have been installed outside of yum. Is it possible for yum to tell me what provided /usr/bin/java if it wasn't installed via yum? It could have been installed using rpm ivh. The reason I am asking is because I am administering a test system and I need to ensure that I repeat the same steps of a previous administrator to provide instructions to the production staff. I cannot find the original RPM nor any record of how /usr/bin/java was installed. Currently, I have 7u45.

Engineer2021
  • 601
  • 8
  • 25

1 Answers1

2

On RHEL /usr/bin/java is a symlink to /etc/alternatives/java which is managed by alternatives. There is not a single package that provides /usr/bin/java. If you want to look for packages that contain Java, use yum whatprovides '*/java'

mtak
  • 581
  • 4
  • 11
  • Thanks for the info. Oracle provides a JRE RPM. So using `yum whatprovides '*/java'` would tell me that ? – Engineer2021 Apr 14 '14 at 13:17
  • No, `yum whatprovides` only searches in the yum repositories (as listed in `/etc/yum.repos.d/`. If you want to find which package installed `/usr/bin/java`, use `rpm -qf /usr/bin/java` – mtak Apr 14 '14 at 13:22