Any way to solve version `GLIBC_2.17' not found?

Where I messed up:

I was trying to install some library that depended on glibc 2.15, and so I installed glibc 2.15 with dpkg and thus overwriting my system's version which it was 2.19. The vast majority of linux programs depend on glibc and since they were built with 2.19, they got angry with me and stopped working, commands like ls, apt-get, aptitude, ping, ifconfig and insmod...

How I fixed it:

  1. I boot from a USB stick, downloaded all the packages related to glic 2.19, there is a red point for the packages on which depend glibc.
  2. mounted the partition:

    mount /dev/sdax /mnt

  3. extracted the contents of these packages in root:

    dpkg -x foo_bar.deb /mnt

  4. updated the ld cache:

    ldconfig -r /mnt

  5. reboot

Tags:

Linux