Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

sh

rpm

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?

like image 635
Jeff7566 Avatar asked Mar 06 '13 02:03

Jeff7566


2 Answers

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.

like image 56
Eric Leschinski Avatar answered Oct 21 '22 23:10

Eric Leschinski


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

like image 45
Jeff7566 Avatar answered Oct 21 '22 23:10

Jeff7566