Jeff7566
Jeff7566

Reputation: 462

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

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?

Upvotes: 18

Views: 68196

Answers (3)

Eric Leschinski
Eric Leschinski

Reputation: 154083

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.

Upvotes: 12

Jeff7566
Jeff7566

Reputation: 462

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"".

Upvotes: 5

Forrest
Forrest

Reputation: 1440

seems to me as though there is most likely a problem with your RPM database. Have you removed or modified it in any way lately? I'd start with the Fedora documentation that explains how to rebuild the database.

Upvotes: 1

Related Questions