Sponsored Content
Operating Systems Linux Red Hat Not able to run any command /lib64/ld-Linux-x86-64.so.2: bad ELF interpreter Post 302785171 by stunn3r on Monday 25th of March 2013 04:31:16 AM
Old 03-25-2013
Hammer & Screwdriver Not able to run any command /lib64/ld-Linux-x86-64.so.2: bad ELF interpreter

Hi,

I accidentally did this:

[
Code:
wadhwaso@nxsdgd01 deps]$sudo rpm -e --nodeps glibc-2.5-107.x86_64
error: %postun(glibc-2.5-107.x86_64) scriptlet failed, exit status 255

and since then I am not able to run any command on this server except 'cd'.

I always get the following error:
Code:
[wadhwaso@nxsdgd01 ~]$ ls
-bash: /bin/ls: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory

I am not able to access this server via ssh and I cant even scp a file if I want to. i cant use 'touch', I cant 'vi'. I always get this error

I checked on another server for the file and following is the info.:

[
Code:
wadhwaso@nxsdgd05 ~]$ ls /lib64/ld-linux-x86-64.so.2
/lib64/ld-linux-x86-64.so.2
[wadhwaso@nxsdgd05 ~]$ ll /lib64/ld-linux-x86-64.so.2
lrwxrwxrwx 1 root root 9 Apr  7  2012 /lib64/ld-linux-x86-64.so.2 -> ld-2.5.so

Fortunately I also have a winscp session opened for nxsdgd01 but as I am not logged in as root I cannot transfer a file in /lib64. How this could be resolved ?

Last edited by jim mcnamara; 03-25-2013 at 07:43 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

What does bad elf flags mean?

Hi all! Could anybody tell me what this means? # /usr/local/sbin/sshd ld.so.1: /usr/local/sbin/sshd: fatal: /usr/local/lib/libcrypto.so.0.9.6: bad ELF flags value: 256 Killed Thanx (1 Reply)
Discussion started by: penguin-friend
1 Replies

2. Shell Programming and Scripting

/bin/sh: bad interpreter: Permission denied

today i started the LFS book (version 4.0). Basically i am using slackware 9.0 to try and install a new linux completely from source on another partition. Now i took the book's recommendations and created a user called lfs so i wouldn't have to do the stuff as root, and i have got the new LFS... (4 Replies)
Discussion started by: Calum
4 Replies

3. UNIX for Dummies Questions & Answers

bad interpreter: Permission denied

I am writing an expect script but am getting a bad interpreter: permission denied error. I don't think the error has anything to do with expect itself, I think I am missing something in how I start the file. For instance, when I run the file under the expect directory it works: cd... (7 Replies)
Discussion started by: earnstaf
7 Replies

4. Ubuntu

How to resolve bad interpreter error

Hi, Iam trying to run a gmake command and have the latest version of Gnu in my redhat linux system. I need to execute the following steps; ---> chmod +x utils/* ---> ./utils/AllCodeManagerFix ---> gmake LINUX Iam able to do the chmod command but when I run the second command I get... (2 Replies)
Discussion started by: viji19812001
2 Replies

5. Shell Programming and Scripting

Perl - bad interpreter: No such file or directory

Here is a puzzler. To start, let me say that I've done a search on this issue and it is definitely not related to line endings being encoded in windows returns. I get this error when I run SOME perl scripts. I have a script called hello_world.pl. I do $cp hello_world.pl new_hello_world.pl... (0 Replies)
Discussion started by: mjmtaiwan
0 Replies

6. Shell Programming and Scripting

bad interpreter: Permission denied

Hi I am running a script: #!bin/bash set -x echo"select * from celldatamap;" || sqlcsv -v -h -s ',' -d MTNSA11G -u datasafe -p datasafe > andrea.csv When I run my script ./tablescript.sh I get the following error: $ ./tablescript.sh (3 Replies)
Discussion started by: ladyAnne
3 Replies

7. Shell Programming and Scripting

bad interpreter when running script

Hi All, I'm not confortable in writing script, can someone can help me, when I run that script below i found this error code : -bash: ./script.sh: /bin/sh.: bad interpreter: Here is the script for i in * x=${i##*.} z=$(perl -e 'print time;') t=$(echo $z-$x|bc)... (12 Replies)
Discussion started by: bzb23
12 Replies

8. Shell Programming and Scripting

Bad Interpreter

Hi. My name is Caleb (a.k.a RagingNinja) form the whited00r forums. (Whited00r makes custom firmware for iOS devices). I have been learning and creating simple shells scripts. I have been recently using VIM for Windows or using VirtualBox to run the UBUNTU OS within VirtualBox to create my shell... (2 Replies)
Discussion started by: RagingNinja
2 Replies

9. UNIX for Advanced & Expert Users

Sqlite3: /lib/ld-Linux.so.2: bad ELF interpreter:

Hi all I'm hoping this is just me being a muppet, has anyone come across this problem before? I am writing an application that uses sqlite3 and I have created a database using it - sqlite3 muse.db SQLite version 3.6.20 Enter ".help" for instructions Enter SQL statements terminated with... (2 Replies)
Discussion started by: steadyonabix
2 Replies

10. Shell Programming and Scripting

-bash: ./p4: /bin/ksh^M: bad interpreter: No such file or directory

I keep getting this error and I am not sure why. -bash: ./p4: /bin/ksh^M: bad interpreter: No such file or directory First I run my makefile and this works fine: goodmain: main.o gcc -o goodmain main.o main.o: main.c gcc -c main.c Then I want to limit my output so I... (11 Replies)
Discussion started by: cokedude
11 Replies
LDD(1)							     Linux Programmer's Manual							    LDD(1)

NAME
ldd - print shared object dependencies SYNOPSIS
ldd [option]... file... DESCRIPTION
ldd prints the shared objects (shared libraries) required by each program or shared object specified on the command line. An example of its use and output is the following: $ ldd /bin/ls linux-vdso.so.1 (0x00007ffcc3563000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f87e5459000) libcap.so.2 => /lib64/libcap.so.2 (0x00007f87e5254000) libc.so.6 => /lib64/libc.so.6 (0x00007f87e4e92000) libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f87e4c22000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f87e4a1e000) /lib64/ld-linux-x86-64.so.2 (0x00005574bf12e000) libattr.so.1 => /lib64/libattr.so.1 (0x00007f87e4817000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f87e45fa000) In the usual case, ldd invokes the standard dynamic linker (see ld.so(8)) with the LD_TRACE_LOADED_OBJECTS environment variable set to 1. This causes the dynamic linker to inspect the program's dynamic dependencies, and find (according to the rules described in ld.so(8)) and load the objects that satisfy those dependencies. For each dependency, ldd displays the location of the matching object and the (hexadeci- mal) address at which it is loaded. (The linux-vdso and ld-linux shared dependencies are special; see vdso(7) and ld.so(8).) Security Be aware that in some circumstances (e.g., where the program specifies an ELF interpreter other than ld-linux.so), some versions of ldd may attempt to obtain the dependency information by attempting to directly execute the program, which may lead to the execution of whatever code is defined in the program's ELF interpreter, and perhaps to execution of the program itself. (In glibc versions before 2.27, the upstream ldd implementation did this for example, although most distributions provided a modified version that did not.) Thus, you should never employ ldd on an untrusted executable, since this may result in the execution of arbitrary code. A safer alterna- tive when dealing with untrusted executables is: $ objdump -p /path/to/program | grep NEEDED Note, however, that this alternative shows only the direct dependencies of the executable, while ldd shows the entire dependency tree of the executable. OPTIONS
--version Print the version number of ldd. -v, --verbose Print all information, including, for example, symbol versioning information. -u, --unused Print unused direct dependencies. (Since glibc 2.3.4.) -d, --data-relocs Perform relocations and report any missing objects (ELF only). -r, --function-relocs Perform relocations for both data objects and functions, and report any missing objects or functions (ELF only). --help Usage information. BUGS
ldd does not work on a.out shared libraries. ldd does not work with some extremely old a.out programs which were built before ldd support was added to the compiler releases. If you use ldd on one of these programs, the program will attempt to run with argc = 0 and the results will be unpredictable. SEE ALSO
pldd(1), sprof(1), ld.so(8), ldconfig(8) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. 2017-09-15 LDD(1)
All times are GMT -4. The time now is 07:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy