When i am upgrading jdk-11.0_18 to jdk-11.0_19 using rpm -Uvh command in playbook. Then why it is deleting the other jdk version i.e jdk-17 and jdk-8. How can i upgrade jdk-11 using rpm command without removing other versions?
I tried soo many things but still want you to give me every possible way to achieve it.
Because you told rpm to upgrade your package. And that means installing a new version and removing the old one. That works for packages like
firefox,postgresql, etc... But does not work for yourjdkwhere you want to have multiple packages.Most packagers solve it that the version is part of the name of package. E.g., you have
java-17-openjdk.spec:
and
java-11-openjdk.spec:
And rpm consider it as two not related packages and happily keeps them both in the system during upgrades. You just need to be sure that there is no same file to avoid pathname conflicts.