What's the root cause of error Failed dependencies: /bin/sh is needed by xxx on RHEL?
I have find root cause for this problem. The rpm-libs is missing on my machine. I reinstall rpm-libs then everything is ok. Note: After installing rpm-libs, if the problem still exists, please try "rpm -v --rebuilddb --define="_rpmlock_path /var/lock/rpm"".
Error while installing RPM -%post script of spec-failed dependencies /bin/sh
%post -p /bin/bash
That will give your post script a terminal to run bash commands and all that you are doing into it.
rpm install file exist issue
I'll give you my thoughts, I see two possible scenarios here:
A) You did not install /usr/lib/libapr-1.so.0 via RPM, so RPM would not have any record of it in its package database. RPM only knows about files that were properly installed via an RPM package. This can be checked by asking RPM where it thinks those files came from:
rpm -qf /usr/lib/libapr-1.so.0 /usr/lib/libapr-1.so.0.3.9
B) You are installing something that requires the 64bit version of libapr-1.so.0 and you only have the 32bit version installed (/usr/lib is normally where all the 32bit or noarch stuff is stored for RedHat/Fedora/Centos, /usr/lib64 would have the 64bit libraries). Unless you have a 64bit system, you should probably be installing 32bit RPMs.
Hope that helps
rpm package installation issue with nodeps flag
The right thing to do at this point is not use RPM. By messing with the root, and then saying "I don't care about dependencies," you're in no man's land. The scripts are trying to do things they cannot, and you're not providing enough information to actually tell you what's wrong.
The easiest solution is to go to a temporary directory and runrpm2cpio your.rpm | cpio -div
and then copy the resulting file tree where it needs to be installed.
So I'm not accused of not answering the actual question, you can do --noscripts
, but then you'll be here tomorrow asking why the program didn't work when you didn't use the support infrastructure that is RPMs to get it done in the first place.
How to make rpm auto install dependencies
Create a (local) repository and use yum
to have it resolve the dependencies for you.
The CentOS wiki has a nice page providing a how-to on this. CentOS wiki HowTos/CreateLocalRepos.
Summarized and further minimized (not ideal, but quickest):
- Create a directory for you local repository, e.g.
/home/user/repo
. - Move the RPMs into that directory.
Fix some ownership and filesystem permissions:
# chown -R root.root /home/user/repo
Install the
createrepo
package if not installed yet, and run# createrepo /home/user/repo
# chmod -R o-w+r /home/user/repoCreate a repository configuration file, e.g.
/etc/yum.repos.d/myrepo.repo
containing[local]
name=My Awesome Repo
baseurl=file:///home/user/repo
enabled=1
gpgcheck=0Install your package using
# yum install packagename
Related Topics
Watermarking Video from The Linux Command Line
Extract a Specific Folder to Specific Directory from a Tar.Gz
What Is The Maximum Allowed Depth of Sub-Folders
Checking Shared Libraries for Non Default Loaders
How to Open Another File in Background Vim from Bash Command-Line
Any Good Guides on Using Ptrace_Sysemu
Matlab - Run File Without Opening Gui, Then Quit
Is Swarm Required for Using Multi-Host Networking Feature Using Overlay in Docker
How to Remember Multiple Tabs' Session in Terminal? (Alike Ff Session Manager)
Linux: Checking If a Socket/Pipe Is Broken Without Doing a Read()/Write()
Get Latest Release Version Number for Chrome Browser
How to Send Esc/Pos Commands to Thermal Printer in Linux
Bash Script That Creates a Directory Structure
How to Find The Memory Consumption of a Particular Process in Linux for Every 5 Seconds
How to Run a Script After User Login Authentication in Linux
Executing Exe or Bat File on Remote Windows Machine from *Nix