60

When I exectued command to install application following error accured: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

I was not aware of how to fix this problem, to find out resolution I searched for solotutions on net and found following resolution:

yum install glibc.i686 or yum install glibc.i386

But bad luck this was not worked at all. It was throwing the following error:

Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
No package glibc.i686 available.
Error: Nothing to do

Again I tried to resolve this and got some solutions from net;

Download glibc rpm packge for centos 6 and install them.

I dowloaded following packeges:

glibc-2.12-1.80.el6.i686.rpm
glibc-common-2.12-1.80.el6.i686.rpm
glibc-devel-2.12-1.80.el6.i686.rpm
glibc-headers-2.12-1.80.el6.i686.rpm
glibc-static-2.12-1.80.el6.i686.rpm
glibc-utils-2.12-1.80.el6.i686.rpm

And tried to install with following command:

yum install glibc.i686
rpm -U glibc-2.12-1.80.el6.i686.rpm
rpm -ivh glibc-2.12-1.80.el6.i686.rpm

None of them is worked. Got following message:

[root@demo tmp_glibc]# rpm -ivh glibc-2.12-1.80.el6.i686.rpm
    error: Failed dependencies:
    glibc-common = 2.12-1.80.el6 is needed by glibc-2.12-1.80.el6.i686
    libfreebl3.so is needed by glibc-2.12-1.80.el6.i686
    libfreebl3.so(NSSRAWHASH_3.12.3) is needed by glibc-2.12-1.80.el6.i686

To resolve dependency problem tried to install "glibc-common-2.12-1.80.el6.i686.rpm", but again bad luck runs and gives error:

[root@demo tmp_glibc]# rpm -ivh glibc-common-2.12-1.80.el6.i686.rpm
error: Failed dependencies:
    glibc = 2.12-1.80.el6 is needed by glibc-common-2.12-1.80.el6.i686
    libc.so.6 is needed by glibc-common-2.12-1.80.el6.i686
    libc.so.6(GLIBC_2.0) is needed by glibc-common-2.12-1.80.el6.i686
    libc.so.6(GLIBC_2.1) is needed by glibc-common-2.12-1.80.el6.i686
    libc.so.6(GLIBC_2.1.1) is needed by glibc-common-2.12-1.80.el6.i686
    libc.so.6(GLIBC_2.1.3) is needed by glibc-common-2.12-1.80.el6.i686
    libc.so.6(GLIBC_2.10) is needed by glibc-common-2.12-1.80.el6.i686
    libc.so.6(GLIBC_2.2) is needed by glibc-common-2.12-1.80.el6.i686
    libc.so.6(GLIBC_2.3) is needed by glibc-common-2.12-1.80.el6.i686
    libcap.so.2 is needed by glibc-common-2.12-1.80.el6.i686
    libdl.so.2 is needed by glibc-common-2.12-1.80.el6.i686
    libdl.so.2(GLIBC_2.0) is needed by glibc-common-2.12-1.80.el6.i686
    libdl.so.2(GLIBC_2.1) is needed by glibc-common-2.12-1.80.el6.i686

Can anyone please help me figure out how to resolve this?

More Details: Operating System: centos 6.3 Yum installed packege list:

[root@demo tmp_glibc]# yum list installed glibc
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Installed Packages
glibc.x86_64   
3
  • 3
    Around these parts (Debian) we just get mysterious "No such file or directory" errors referencing files that exist, without any mention of ELF interpreters in the error message.
    – SamB
    Commented Jan 24, 2014 at 20:24
  • This question would be a better fit on Unix & Linux, being more about system configuration than software development. Commented Nov 16, 2018 at 16:51
  • On Debian/Ubuntu 18.04: sudo dpkg --add-architecture i386 && sudo apt update && sudo apt install libc6:i386 Commented Dec 27, 2019 at 5:42

9 Answers 9

80
yum install glibc.i686

install this.

1
  • 7
    I'm not sure if these are commonly linked, but I also had to run the command: yum install libstdc++.i686 to completely resolve my missing dependencies.
    – yellavon
    Commented Jul 20, 2016 at 15:57
31

You did not mention what the command was that you were trying to run that produced the error message. However, the bottom line problem is that you are trying to run and/or install 32-bit (i686) packages on a 64-bit (x86_64) system which is not a good idea. For example, if you were trying to run the 32-bit version of Perl on a 64-bit system, the result would be something like

perl: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

If you still want to use the rpm command to install the 32-bit versions of glibc and glibc-common on your system, then you need to know that you must install both of the packages at the same time and as a single command because they are dependencies of each other. The command to run in your case would be:

rpm -Uvh glibc-2.12-1.80.el6.i686.rpm glibc-common-2.12-1.80.el6.i686.rpm

10
Missing prerequisites. IBM has the solution below:

yum install gtk2.i686
yum install libXtst.i686

If you received the the missing libstdc++ message above, 
install the libstdc++ library: 
yum install compat-libstdc++

https://www-304.ibm.com/support/docview.wss?uid=swg21459143
6

As @borayeris said,

yum install glibc.i686

But if you cannot find glibc.i686 or libstdc++ package, try -

sudo yum search glibc
sudo yum search libstd

and then,

sudo yum install {package}

1
  • Thanks for expanding my answer. I didn't know search.
    – borayeris
    Commented Aug 29, 2020 at 12:03
3

looks to me yum install glibc.i686 should have worked. Unless Peter was not root. He has the 64 bit glib installed, he is installing a 32 bit package that requires the 32 bit glib which is glib.i686 for intel processors.

1

I had the same issue, the following commands can resolve:

sudo yum install  glibc-common glibc  (mutual dependency)
sudo yum install  glibc.i686  (the missing version)
1

These are the installation i had to run in order to make it work on fedora 22 :-

glibc-2.21-7.fc22.i686

alsa-lib-1.0.29-1.fc22.i686

qt3-3.3.8b-64.fc22.i686

libusb-1:0.1.5-5.fc22.i686

0

Your CentOS/Redhat repo configuration is incorrect. So Your system cant access repo sites. Check your repo configuration /etc/yum.conf and /etc/yum.repos.d/ And make sure you are able to access repo addresses. If you are able to access repo sites these commands does not give any error: yum upgrade yum list

Then try to install packages.

0

Ubuntu and other Debian based distros:

# apt install libc6:i386

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