/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
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:
But bad luck this was not worked at all. It was throwing the following error:
Again I tried to resolve this and got some solutions from net;
I dowloaded following packeges:
And tried to install with following command:
None of them is worked. Got following message:
To resolve dependency problem tried to install “glibc-common-2.12-1.80.el6.i686.rpm”, but again bad luck runs and gives error:
Can anyone please help me figure out how to resolve this?
More Details: Operating System: centos 6.3 Yum installed packege list:
7 Answers 7
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
“/usr/bin/javac: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory”
I installed jdk1.8.0_161 in linux server RHEL 7.. I am not able to check java version due to “/usr/bin/javac: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory”
below are the steps i followed to install jdk,
1 Answer 1
Looks like you unpacked a tar.gz file in /opt/. This version is obviously trying to use the 32bits /lib/ld-linux.so.2 . (The 64bits linker is /usr/lib64/ld-linux-x86-64.so.2 -> ld-2.17.so )
# cd Downloads/ && yum install ./jdk-8u162-linux-x64.rpm
Not the answer you’re looking for? Browse other questions tagged linux java-8 or ask your own question.
Hot Network Questions
Subscribe to RSS
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
site design / logo © 2020 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2020.9.18.37632
CentOS 64 bit bad ELF interpreter
I have just installed CentOS 6 64bit version, I’m trying to install a 32-bit application on a 64-bit machine and got this error:
/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
I’m new to linux. How do I resolve this?
8 Answers 8
You’re on a 64-bit system, and don’t have 32-bit library support installed.
To install (baseline) support for 32-bit executables
(if you don’t use sudo in your setup read note below)
Most desktop Linux systems in the Fedora/Red Hat family:
Possibly some desktop Debian/Ubuntu systems?:
Fedora or newer Red Hat, CentOS:
Even older RHEL, CentOS:
should grab you the (first, main) library you need.
Once you have that, you’ll probably need support libs
Anyone needing to install glibc.i686 or glibc.i386 will probably run into other library dependencies, as well. To identify a package providing an arbitrary library, you can use
if you’re not sure it’s in /usr/bin you can also fall back on
The output will look like this:
Check for missing libraries (e.g. libSM.so.6 in the above output), and for each one you need to find the package that provides it.
Commands to find the package per distribution family
Fedora/Red Hat Enterprise/CentOS:
or, on older RHEL/CentOS:
or, on Debian/Ubuntu:
first, install and download the database for apt-file
Note the prefix path /usr/lib in the (usual) case; rarely, some libraries still live under /lib for historical reasons … On typical 64-bit systems, 32-bit libraries live in /usr/lib and 64-bit libraries live in /usr/lib64 .
(Debian/Ubuntu organise multi-architecture libraries differently.)
Installing packages for missing libraries
The above should give you a package name, e.g.:
In this example the name of the package is libSM and the name of the 32bit version of the package is libSM.i686 .
You can then install the package to grab the requisite library using pkcon in a GUI, or sudo dnf/yum/apt-get as appropriate…. E.g pkcon install libSM.i686 . If necessary you can specify the version fully. E.g sudo dnf install ibSM-1.2.0-2.fc15.i686 .
Some libraries will have an “epoch” designator before their name; this can be omitted (the curious can read the notes below).
Incidentially, the issue you are facing either implies that your RPM (resp. DPkg/DSelect) database is corrupted, or that the application you’re trying to run wasn’t installed through the package manager. If you’re new to Linux, you probably want to avoid using software from sources other than your package manager, whenever possible.
If you don’t use “sudo” in your set-up
every time you see sudo , eg,
About the epoch designator in library names
The “epoch” designator before the name is an artifact of the way that the underlying RPM libraries handle version numbers; e.g.
Here, the 2: can be omitted; just pkcon install libpng.i686 or sudo dnf install libpng-1.2.46-1.fc16.i686 . (It vaguely implies something like: at some point, the version number of the libpng package rolled backwards, and the “epoch” had to be incremented to make sure the newer version would be considered “newer” during updates. Or something similar happened. Twice.)
Updated to clarify and cover the various package manager options more fully (March, 2016)
/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory No package glibc.i386 available
I am trying to install the weblogic server on Linux, I am getting below error not able install the weblogic software and not able install the “glibc.i386”[root@localhost weblogic]# uname -a
Linux localhost.localdomain 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux[root@localhost weblogic]# ./wls1036_linux32.bin bash: ./wls1036_linux32.bin: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory [root@localhost weblogic]# yum install glibc.i686 Loaded plugins: refresh-packagekit, rhnplugin This system is not registered with RHN. RHN support will be disabled. Setting up Install Process No package glibc.i686 available. Error: Nothing to do [root@localhost weblogic]# yum install glibc.i386 Loaded plugins: refresh-packagekit, rhnplugin This system is not registered with RHN. RHN support will be disabled. Setting up Install Process No package glibc.i386 available. Error: Nothing to do
Let me know how to download the required packages and how to install the packages. what is the exact command’s
RHEL 6/7 x86_64: ‘/lib/ld-linux.so.2: bad ELF interpreter’ installing various firmware updates – IBM Systems
System x option packages, mainly firmware packages, cannot be installed under Red Hat Enterprise Linux (RHEL) 6 and RHEL 7 x86_64(64-bit) machine. When a user installs an option driver package or firmware package, the user may receive the following output: ‘/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory’
Resolving The Problem
RETAIN tip: H213430
System x option packages, mainly firmware packages, cannot be installed under Red Hat Enterprise Linux (RHEL) 6 and RHEL 7 x86_64(64-bit) machine.
When a user installs an option driver package or firmware package, the user may receive the following output:
|‘/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory’|
The system is configured with at least one of the following:
- Red Hat Enterprise Linux 6, any update
- Red Hat Enterprise Linux 7, any Base Install
This tip is not system specific.
This tip is not option specific.
Note: This does not imply that the network operating system will work under all combinations of hardware and software.
Please see the compatibility page for more information:
The required libraries are available on the RHEL 6 and RHEL7 distribution DVD or the Red Hat customer support web site.
To install the required libraries using distribution DVD:
- Mount the DVD to the system. Insert the DVD into the DVD drive.
- Select open a terminal window as a root.
- Mount the DVD. The following assumes the DVD is mount under directory /mnt/cdrom.
- Create the text file server.repo in the /etc/yum.repos.d directory.
Add the following text to the file:
where baseurl depends on the mounting point and the RHEL distribution.
- Execute the command:
|[root@localhost]# yum clean all|
- Execute the command to import related public keys:
During the install, users might receive prompts to ask for confirmation. Answer with ‘y’.
After completion of these steps, run the option package installation.
The option package installation wrapper is a 32-bit application and requires 32-bit versions of OS system libraries. These libraries are not installed on RHEL 6 and RHEL7 x86_64 (64-bit) by default. Users must install these 32-bit libraries on their systems before running the option package installation.
BladeCenter:Red Hat Enterprise Linux 6
BladeCenter:Red Hat Enterprise Linux 6 x86-64
System x:Red Hat Enterprise Linux 6
System x:Red Hat Enterprise Linux 6 x86-64
PureFlex System and Flex System:Red Hat Enterprise Linux 6 x86-64
BladeCenter:Red Hat Enterprise Linux 7
System x:Red Hat Enterprise Linux 7
Lenovo x86 servers:Red Hat Enterprise Linux 6
Lenovo x86 servers:Red Hat Enterprise Linux 6 x86-64
Lenovo x86 servers:Red Hat Enterprise Linux 7