-1

we are tryng to install the java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm

yum localinstall java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Examining java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm: 1:java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64
Marking java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.0-openjdk-devel.x86_64 1:1.8.0.161-2.b14.el7 will be installed
--> Processing Dependency: java-1.8.0-openjdk(x86-64) = 1:1.8.0.161-2.b14.el7 for package: 1:java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64
--> Finished Dependency Resolution
Error: Package: 1:java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64 (/java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64)
           Requires: java-1.8.0-openjdk(x86-64) = 1:1.8.0.161-2.b14.el7
           Installed: 1:java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64 (installed)
               java-1.8.0-openjdk(x86-64) = 1:1.8.0.171-8.b10.el7_5
           Available: 1:java-1.8.0-openjdk-1.8.0.161-2.b14.el7.x86_64 (local)
               java-1.8.0-openjdk(x86-64) = 1:1.8.0.161-2.b14.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

we can see from the output that:

 Requires: java-1.8.0-openjdk(x86-64) = 1:1.8.0.161-2.b14.el7

but what I not understand is that we try to install the same rpm that is required!!

java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm

so what is going here?

current installed rpm's

rpm -qa | grep openjdk
java-1.8.0-openjdk-headless-1.8.0.171-8.b10.el7_5.x86_64
java-1.8.0-openjdk-1.8.0.171-8.b10.el7_5.x86_64

 java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-b10)
OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)

the only way to install it is by rpm ( not by yum )

rpm -Va --nofiles --nodigest java-1.7.0-openjdk-devel-1.7.0.171-2.6.13.2.el7.x86_64.rpm
5

java-1.8.0-openjdk-devel and java-1.8.0-openjdk versions need to match exactly.

in short:

yum downgrade java-1.8.0-openjdk-1.8.0.161-2.b14.el7
yum install java-1.8.0-openjdk-devel-1.8.0.161-2.b14.el7.x86_64.rpm

I just wrote a whole answer to this question here: https://stackoverflow.com/questions/57498755/installing-python36-devel-on-rhel7-failing/57519956#57519956

  • but we not found devel as java version – yael Aug 16 at 10:11
  • we cant downgrade because the min java we need is 1.8.0_171 – yael Aug 16 at 10:11
  • what bad with my option - "rpm -Va --nofiles --nodigest java-1.7.0-openjdk-devel-1.7.0.171-2.6.13.2.el7.x86_64.rpm" – yael Aug 17 at 17:48
  • 1
    But “rpm -V” just verified installed packages, it doesn’t install anything. The problem you have is that the different releases of the packages cause yum to fail during the dependency check. Every package must match. – jsbillings Aug 17 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.