What's the root cause of error "Failed dependencies: /bin/sh is needed by xxx" on RHEL?

Jeff7566 picture Jeff7566 · Mar 6, 2013 · Viewed 43k times · Source

When I install a rpm package on RHEL using rpm, I got a error message just like "Failed dependencies: /bin/sh is needed by xxx".

I checked that /bin/sh is there and it links to /bin/bash and bash works well.

I found a solution that to add --nodeps to the rpm command to solve this problem. But I really want to know what is the root cause?

Answer

Eric Leschinski picture Eric Leschinski · Jul 7, 2014

How to reproduce this error on a fresh install of Ubuntu 14.04.

  1. Fresh install of Ubuntu 14.04
  2. Do a sudo apt-get install rpm
  3. download the nomachine rpm 64 bit linux from https://www.nomachine.com/download/download&id=4
  4. Do a chmod +x nomachine_4.2.25_1_x86_64.rpm on it
  5. extract it like this:

    el@apollo:~Desktop$ sudo rpm -i nomachine_4.2.25_1_x86_64.rpm
    rpm:  RPM should not be used directly install RPM packages, use Alien instead!
    rpm: However assuming you know what you are doing...
    error: Failed dependencies:
    /bin/sh is needed by nomachine-4.2.25-1.x86_64
    
  6. So that is the error. To fix it I followed its advice to use alien.

    sudo alien -i nomachine_4.2.25_1_x86_64.rpm --scripts
    

And no machine installed correctly.