The default installation of chef-client happens in /opt directory. I have a requirement where i need to install chef client under /usr/local/custom directory.
I did below trails.
rpm -i --prefix=/usr/local/custom chef-13.8.5-1.el7.x86_64.rpm
From that I am able to install the chef client with directory path as i expected. But while trying to run chef client command, i got an error, that is:
bash: ./chef-client: /opt/chef/embedded/bin/ruby: bad interpreter.
I have downloaded the chef client version . Installed it on my test box, after that i created a tar.gz file with the directory structure under /rpmbuild/SOURCES/
Later I tried to create my own RPM SPEC file as per my requirement under /rpmbuild/SPECS/ and ran the rpmbuil. And created my own rpm.
rpm -ivh pdit-1-0.x86_64.rpm
error: Failed dependencies:
/opt/chef/embedded/bin/ruby is needed by pdit-1-0.x86_64
perl(WWW::Curl::Easy) is needed by pdit-1-0.x86_64
Later I tried with the option “rpm –ivh pdit-1-0.x86_64.rpm –nodeps” . From that I am able to install the chef client with directory path as i expected .
But while trying to run chef client command, I got an error, that is: “bash: ./chef-client: /opt/chef/embedded/bin/ruby: bad interpreter:”
Can some please help me on this.
Can we run 2 Chef instances in parallel in one system?