Search code examples
redhatrpmrpmbuildrpm-spec

Install other dependency rpm during the rpm installation


i need to install openjdk 11 along with my rpm. my software runs on java 11 but our pc have different version of java already installed.

please help me to install openjdk11 along with my rpm installation

i tried using yum install inside %pre

%pre
java-11-openjdk

Solution

  • You cannot manipulate the RPM database in scriptlets. You need to put Requires: java-11-openjdk and then provide the RPM in the same manner as your own software, e.g. yum/dnf repository, burned to a CD, etc.