I was updating gcc to the version in the testing repository of debian; in the middle of the update, it recommends me to stop the postgres service and it gave me the option to stop the installation. I stopped it and got this error:

Preparando para desempaquetar .../libc6_2.24-9_amd64.deb ...
Checking for services that may need to be restarted...
Checking init scripts...
Stopped glibc upgrade.  Please retry the upgrade after you have
checked or stopped services by hand.
dpkg: error al procesar el archivo /var/cache/apt/archive/libc6_2.24-9_amd64.deb (--unpack):
el subproceso script pre-installation nuevo devolvió el código de salida de error 1
Procesando disparadores para man-db ( ...
Procesando disparadores para libc-bin (2.19-18+deb8u7) ...
E: Sub-process /usr/bin/dpkg returned an error code (1)

Now I can't resume the install, and when I try to run any apt-get command, I get errors in return.

#apt-get -f install
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias       
Leyendo la información de estado... Hecho
Corrigiendo dependencias... falló.

The following packages have unmet dependencies:

 libc-dev-bin : Depende: libc6 (> 2.24) pero 2.19-18+deb8u7 está instalado
 libc6-dev : Depende: libc6 (= 2.24-9) pero 2.19-18+deb8u7 está instalado
 locales : Depende: libc-bin (> 2.24) pero 2.19-18+deb8u7 está instalado

 E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages
 E: Unable to correct dependencies

Anyone know how could I solve this?

  • The question would be on the verge of being closed even if the error messages were given in English... – countermode Feb 27 '17 at 13:22
  • Please add the command generating the first output; when posting here please add also LANG=C just before the command for it to generate english output. As in: LANG=C apt-get -f install ; bear in mind whilst some of us understand spanish, this is a english-only list. – Rui F Ribeiro Feb 27 '17 at 13:26
  • 1
    @RuiFRibeiro i realized late about the language and i was out of time to generate the ouput again sorry – reidem Mar 1 '17 at 9:39
  • @countermode thanks for the comment, after reading about at help center i think i could have ask it better – reidem Mar 1 '17 at 9:52

You need to stop the PostgreSQL service, then restart the original installation you attempted; presumably something like

apt-get install gcc-6/testing

I do hope you realise you're upgrading most of the way to Debian 9 by doing this (because of the glibc upgrade)...

  • Any attempt to run apt-get retrieve an error because of missing dependencies that couldn't solve himself. – reidem Mar 1 '17 at 9:56

This error was due to missing dependencies that apt-get couldn't solve.

In my case the packages was already downloaded by apt-get in the first attempt to install. Looking at the first output dpkg throws the error at this package libc6_2.24-9_amd64.deb.

dpkg -i /var/cache/apt/archives/libc6_2.24-9_amd64.deb

This directory is where apt-get save deb files as a cache.

At second output you could see that there is another dependencie so look for the proper package in that directory and install it

dpkg -i /var/cache/apt/archives/libc-bin_2.24-9_amd64.deb

If there is no more dependencies now you could follow up the installation

apt-get install gcc/testing

Look carefull at the retrieved info of the apt-get commands or you could end removing importing things on your system

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.