I installed and configured Debian 7.2 Wheezy AMD64 few days ago, I spent days configuring everything out and installing useful apps etc, so finally I tried to install Wine.
And what happened?
Dependency problem - libc6 is version 2.13 but it should be 2.17 to satisfy Wine. Unfortunately, there is no stable version available so I used sid to install libc6 2.17. It got installed, but, after finishing installation, all commands stopped working. I was unable to call any command, it just reports that command is NOT found. I thought that reboot may fix the problem, so I done hard-reboot and after GRUB menu it stucks:

switch_root can't execute '/sbin/init' no such file or directory
Kernel Panic - not syncing

And my Debian is now is in unusable state. I have Dual Boot with Windows 7 64-bit. I also have Debian 7.2 Wheezy AMD64 live on USB flash so I can use it for repair.

I do not have enough experience with Debian based distros to solve this. Can someone give me step-by-step guide?

migrated from serverfault.com Feb 2 '14 at 22:10

This question came from our site for system and network administrators.

  • 2
    Somewhat off-topic, but how did you install Wine? I think it's weird it wouldn't work with the libc provided... As for the solution, normally I would advice chrooting into the installation with a liveCD, but I think you'll be getting the same error. You could try to copy all /lic/libc files from the live environment into the new system, and once you have it running, reinstall the proper libc. – Halfgaar Feb 2 '14 at 21:27
  • I tried to install latest version of Wine, not one from the repository. – xZero Feb 2 '14 at 22:01
  • 3
    If you need to run a modern version of wine, it's probably best to do so on a distribution which already provides the necessary dependencies. Mixing and matching from different Debian versions is generally a recipe for disaster and should be avoided when possible. – Michael Hampton Feb 2 '14 at 22:11
  • The thing is that this method is worked on Debian 7 Wheezy x86.... So I didn't expected problems like this. – xZero Feb 3 '14 at 0:11
  • It will take some serious Linux chops to recover the Debian system so it works again (copying over a bunch of /lib/ files from a rescue CD to the broken system, removing cached ld files by hand, etc.) Is there any important data that would be lost if you reinstall? – samiam Feb 3 '14 at 0:35

To repair libc6, start your Debian-based rescue system from the USB flash, mount your broken system partition and prepare a chroot environment using

mount --bind /proc MOUNTPATH/proc 
mount --rbind /dev MOUNTPATH/dev
mount --bind /sys MOUNTPATH/sys

Download the libc6 2.13-38 package for your architecture (probably amd64) from http://packages.debian.org/wheezy/libc6 and install it using dpkg -root=MOUNTPATH PATH_TO_DEBFILE. Probably you need to add some --force- flags. See the man page of dpkg for details. If this does not work, you can extract files using dpkg-deb -X and then copy it to the correct folder and run ldconfig -r MOUNTPATH.

After this you should be able to chroot to MOUNTPATH and run update-initramfs -u to update your initrd. Now your system should boot again. The package dependencies are probably still broken and need to be fixed by uninstalling/downgrading packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.