user3481957
user3481957

Reputation: 161

Chef rpm_package throws error installing from local source

I'm using Chef 12.5.1 and the Docker image Test-Kitchen is running is running RHEL 7.x

I download jdk-8u65-linux-x64.rpm to a local directory on my Docker test instance and run the following recipe to install it.

rpm_package 'install_java' do
  package_name 'jdk-8u65-linux-x64.rpm'
  source '/home/user/jdk-8u65-linux-x64.rpm'
end

But it throws the following error:

---- Begin output of rpm  -i /home/user/jdk-8u65-linux-x64.rpm ----
STDOUT:
STDERR: error: Failed dependencies:
   /usr/bin/find is needed by jdk1.8.0_65-2000:1.8.0_65-fcs.x86_64
---- End output of rpm  -i /home/user/jdk-8u65-linux-x64.rpm ----

The only information I could find was this comment but I tried "chmod +x" on the RPM and it didn't help. Any ideas?

Upvotes: 0

Views: 261

Answers (1)

coderanger
coderanger

Reputation: 54181

rpm on its own isn't capable of installing dependencies, normally this would be handled by yum. You can either install the RPM with yum or find a package to fulfill the dependency (probably find or findutils) and install it.

Upvotes: 1

Related Questions