Pivotal Knowledge Base

Follow

Pivotal hadoop deployment fails to install postgresql-jdbc with java dependency error

Environment

  • PHD 2.x

Symptom

Examining /tmp/postgresql-jdbc-8.4.704-2.el6.noarch.rpm: postgresql-jdbc-8.4.704-2.el6.noarch
Marking /tmp/postgresql-jdbc-8.4.704-2.el6.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package postgresql-jdbc.noarch 0:8.4.704-2.el6 will be installed
--> Processing Dependency: java for package: postgresql-jdbc-8.4.704-2.el6.noarch
--> Finished Dependency Resolution
Error: Package: postgresql-jdbc-8.4.704-2.el6.noarch (/postgresql-jdbc-8.4.704-2.el6.noarch)
           Requires: java
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
 

Cause

In this case deployment fails to install postgresql-jdbc because the system does not have access to any remote yum repositories. The that indicates java is not installed is misleading because customer did install Orcale JDK 1.7 but apparently postgresql-jdbc requires OpenJDK

How to verify a RPM pacakage dependency

[root@pccadmin ~]# yum deplist /tmp/puppet/postgresql-jdbc-8.4.704-2.el6.noarch.rpm
Loaded plugins: downloadonly, fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.ancl.hawaii.edu
 * extras: mirrors.usc.edu
 * updates: centos.mirror.lstn.net
Finding dependencies:
package: postgresql-jdbc.noarch 8.4.704-2.el6
  dependency: java
   provider: java-1.7.0-openjdk.x86_64 1:1.7.0.65-2.5.1.2.el6_5
   provider: java-1.6.0-openjdk.x86_64 1:1.6.0.0-11.1.13.4.el6
   provider: java-1.8.0-openjdk.x86_64 1.8.0.20-3.b26.el6
   provider: java-1.5.0-gcj.x86_64 1.5.0.0-29.1.el6
   provider: java-1.6.0-openjdk.x86_64 1:1.6.0.33-1.13.5.0.el6_6
   provider: java-1.6.0-openjdk.x86_64 1:1.6.0.33-1.13.5.1.el6_6
   provider: java-1.7.0-openjdk.x86_64 1:1.7.0.71-2.5.3.1.el6
   provider: java-1.7.0-openjdk.x86_64 1:1.7.0.71-2.5.3.2.el6_6
   provider: java-1.7.0-openjdk.x86_64 1:1.7.0.75-2.5.4.0.el6_6
   provider: java-1.8.0-openjdk.x86_64 1.8.0.25-1.b17.el6
  dependency: /bin/sh
   provider: bash.x86_64 4.1.2-29.el6
  dependency: jpackage-utils
   provider: jpackage-utils.noarch 1.7.5-3.12.el6

Fix

Manually install openJDK 1.7.0 and retry the postgresql-jdbc install

NOTE: After installing Open JDK then your default java could switch to openjdk. This might cause issues when running hadoop application. Please review this article if you need help verifing you java instalation configuration

Comments

Powered by Zendesk