Linux system with bash located in /bin and not /usr/bin.

Attempting to install (as root) glibc-common-2.17-222.el7.x86_64 using either of the following commands:

rpm -ivh glibc-2.17-222.el7.x86_64.rpm glibc-common-2.17-222.el7.x86_64.rpm


yum localinstall glibc-common-2.17-222.el7.x86_64.rpm glibc-2.17-222.el7.x86_64.rpm

Get a dependency error: /usr/bin/bash is needed by glibc-common-2.17-222.el7.x86_64


[root@ruapp117 dep]# ls -ld /bin
dr-xr-xr-x. 2 root root 4096 Mar  5  2018 /bin


[root@ruapp117 dep]# rpm -q --whatprovides /bin/bash /usr/bin/bash
error: file /usr/bin/bash: No such file or directory


[root@smbruapp117 dep]# rpm -qa | grep bash

Connectivity to the internet is not possible, am having to manually download and install.

  • From where do these packages come from? Why not install/upgrade things directly from remote repositories? – Patrick Mevzek Oct 12 '18 at 15:42
  • 2
    /bin on RHEL7/CentOS7 is usually a symlink to /usr/bin, see ls -ld /bin. So as such, bash should be visible in both directories. Worth updating question with output of ls -ld /bin ; rpm -q --whatprovides /bin/bash /usr/bin/bash ; rpm -qa | grep bash – steve Oct 12 '18 at 15:45
  • Added output to the question. This is a stand alone system and can't be connected to acquire from repositories. – Kevin Williams Oct 12 '18 at 16:12

Since that's the only issue preventing the installation, and you're sure that you have bash installed, tell RPM to skip dependency-checking:

rpm -ivh --nodeps glibc-2.17-222.el7.x86_64.rpm glibc-common-2.17-222.el7.x86_64.rpm

Are you trying to install a centos package on another os?

The package you are trying to install depends on /bin/bash. The question is why, and/or why /bin/bash is not on your machine.

So maybe the packager hardcoded the dependency on /bin/bash, then there is not much you can do except rebuilding the src.rpm and changing the spec file, or force installing (rpm --nodeps) and creating a symlink so everything works.

When rpm builds a package, it automatically searches for its dependencies, so maybe it was rpmbuild that added the dependency, maybe because the machine on which the rpm was built had /bin/bash and not /usr/bin/bash. In that case you can try searching another version of this package that was not built on centos (without the 'el7' part) and try installing that.

These are some thoughts that should help you quite a lot on the way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.