Legoboy
Legoboy

Reputation: 102

ELF interpreter error

When I execute ANY command, this happens.

/lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory

I believe I accidentally removed glibc. Is there any way to install it? Non of the commands works. The system is CentOS 6, on a 1GB RAM VPS.

Upvotes: 0

Views: 2697

Answers (3)

Navaneeth
Navaneeth

Reputation: 51

Use below Command to remove

sudo yum remove java

example now i removing java

Upvotes: 1

Nikhil A R
Nikhil A R

Reputation: 71

If you have only removed the symbolic links associated with glibc, you can recover it back by running ldconfig utility. It is a static binary and hence can be run successfully on broken glibc systems. On some distos, ldconfig would be a script which internally calls something like ldconfig.real, which is again a static binary.

Upvotes: 0

Istvan
Istvan

Reputation: 8572

You can reinstall Glibc from an external system only, since the installing binaries use glibc. After booting up a rescue image mount the root of your system somewhere and download the glibc version that you would like to install and execute the following:

rpm -Uvh --root=/mnt/broken_system/ --force glibc-X.rpm

This install back the Glibc on your system so you can reboot your operating system and it will work.

Upvotes: 1

Related Questions