2

I have made a big mistake while removing some duplicate packages as it appears to be broken. yum

 1036  rpm -e --nodeps glibc-2.12-1.132.el6_5.2.x86_64
 1037  rpm -e --nodeps nscd-2.12-1.132.el6_5.2.x86_64
 1038  rpm -e --nodeps glibc-common-2.12-1.132.el6_5.2.x86_64
 1040  rpm -e --nodeps glibc-common-2.12-1.132.el6.x86_64 glibc-devel-2.12-1.132.el6.x86_64 glibc-headers-2.12-1.132.el6.x86_64
 1041  rpm -e glibc.x86_64
 1042  rpm -e --nodeps glibc.x86_64

The issue happened after doing 1042 step. None of commands work(including yum, rpm, ls, cp etc) and getting error

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

I thought that installing glibc after removing all the current ones would help to resolve the duplicate package error :( Now I realised that it is used as the C library in the GNU system and most systems with the Linux kernel. It defines the "system calls" and other basic facilities such as open, malloc, printf, exit, etc.

Is there any possible solutions other than reinstall?

I have lost ssh access. Maybe anything can be done using rescue cd?

Thanks

Michael
  • 23
  • 3

1 Answers1

4

Yeah this is so not the end of the world.

You'll want to boot using a rescue CD - which for CentOS means the installation media.

At the boot prompt, enter linux rescue

You will be presented with an option to mount your filesystem in read/write mode, mount it in read only mode, or skip mounting it.

Select the option to mount in read/write mode.

Your normal root filesystem will be mounted as /mnt/sysimage/

Obtain the rpm's for the missing packages.

Install them, using the --root /mnt/sysimage/ option to rpm.

Joe Sniderman
  • 2,809
  • 1
  • 22
  • 26
  • thanks. it was a kvm vps with 256RAM and I had installed centos 6.5minimal via solusvm since it didn't allow installing via full cd. Now my system is broken and same issue while booting via 6.5 netinstall and it says" you do not have enough ram to install centos to this machine". So I have tried with 5.10, I was able to start rescue and set keyboard settings. But in next step its not able to find the image in CD-ROM selected. Centos 6 cannot rescue using centos 5 ? Is there any way to rescue system in minimal text mode or so? – Michael Aug 24 '14 at 04:38
  • You don't need enough ram to install to boot to single user using the CD. If you have access to the hardware node, or can access your disk image from another VM, it is even simpler though: just mount it from either the hardware node or another VM, and then use rpm. – Joe Sniderman Aug 24 '14 at 04:42
  • But do not use netinstall. Use regular installation disk 1. – Joe Sniderman Aug 24 '14 at 04:42
  • I dont have access to the node or any other vm and they provide netinstall cd only. I had to contact them and increased ram temporarily to rescue it. Then I was able to download rpm and install glibc and glibc-common as mentioned. Everything is working fine now. Thank you very much – Michael Aug 24 '14 at 16:12