¿Por qué mi actualización a 12.04 falló con el error "glibc no encontrado" o "libc6" o "requiere el kernel 2.6.24"?


8

Actualicé el formulario de instalación de mi servidor 11.04 a 11.10, luego a 12.04 a través de ssh. Todo parece estar bien, pero hay un pequeño problema con glibc, que está arruinando mi apt.

Lo intenté sudo apt-get install -fpero no obtiene lo que necesita. Estoy corriendo en una máquina virtual OpenVZ.

¿Cómo puedo arreglar mis dependencias apt?

sysadmin@svr:~$ sudo apt-get update 
Ign http://archive.canonical.com precise InRelease
Ign http://archive.ubuntu.com precise InRelease
Ign http://archive.ubuntu.com precise-updates InRelease
Ign http://archive.ubuntu.com precise-security InRelease
Get:1 http://archive.ubuntu.com precise Release.gpg [198 B]
Hit http://archive.canonical.com precise Release.gpg 
Get:2 http://archive.ubuntu.com precise-updates Release.gpg [198 B]
Hit http://archive.canonical.com precise Release      
Get:3 http://archive.ubuntu.com precise-security Release.gpg [198 B]
Hit http://archive.canonical.com precise/partner i386 Packages
Get:4 http://archive.ubuntu.com precise Release [49.6 kB]
Ign http://archive.canonical.com precise/partner TranslationIndex
Get:5 http://archive.ubuntu.com precise-updates Release [49.6 kB]
Get:6 http://archive.ubuntu.com precise-security Release [49.6 kB]               
Get:7 http://archive.ubuntu.com precise/main i386 Packages [1274 kB]            
Ign http://archive.canonical.com precise/partner Translation-en                  
Get:8 http://archive.ubuntu.com precise/restricted i386 Packages [8431 B]
Get:9 http://archive.ubuntu.com precise/universe i386 Packages [4796 kB]
Hit http://archive.ubuntu.com precise/main TranslationIndex                                                                                                                       
Hit http://archive.ubuntu.com precise/restricted TranslationIndex                                                                                                                 
Hit http://archive.ubuntu.com precise/universe TranslationIndex                                                                                                                   
Get:10 http://archive.ubuntu.com precise-updates/main i386 Packages [20.2 kB]                                                                                                     
Get:11 http://archive.ubuntu.com precise-updates/restricted i386 Packages [770 B]                                                                                                 
Get:12 http://archive.ubuntu.com precise-updates/universe i386 Packages [2258 B]                                                                                                  
Get:13 http://archive.ubuntu.com precise-updates/main TranslationIndex [72 B]                                                                                                     
Get:14 http://archive.ubuntu.com precise-updates/restricted TranslationIndex [71 B]                                                                                               
Get:15 http://archive.ubuntu.com precise-updates/universe TranslationIndex [72 B]                                                                                                 
Get:16 http://archive.ubuntu.com precise-security/main i386 Packages [11.8 kB]                                                                                                    
Get:17 http://archive.ubuntu.com precise-security/restricted i386 Packages [14 B]                                                                                                 
Get:18 http://archive.ubuntu.com precise-security/universe i386 Packages [1357 B]                                                                                                 
Get:19 http://archive.ubuntu.com precise-security/main TranslationIndex [72 B]                                                                                                    
Get:20 http://archive.ubuntu.com precise-security/restricted TranslationIndex [70 B]                                                                                              
Get:21 http://archive.ubuntu.com precise-security/universe TranslationIndex [71 B]                                                                                                
Hit http://archive.ubuntu.com precise/main Translation-en                                                                                                                         
Hit http://archive.ubuntu.com precise/restricted Translation-en                                                                                                                   
Hit http://archive.ubuntu.com precise/universe Translation-en                                                                                                                     
Get:22 http://archive.ubuntu.com precise-updates/main Translation-en [9145 B]                                                                                                     
Hit http://archive.ubuntu.com precise-updates/restricted Translation-en                                                                                                           
Get:23 http://archive.ubuntu.com precise-updates/universe Translation-en [1344 B]                                                                                                 
Get:24 http://archive.ubuntu.com precise-security/main Translation-en [3549 B]                                                                                                    
Hit http://archive.ubuntu.com precise-security/restricted Translation-en                                                                                                          
Get:25 http://archive.ubuntu.com precise-security/universe Translation-en [760 B]                                                                                                 
Fetched 6279 kB in 57s (109 kB/s)                                                                                                                                                 
Reading package lists... Done
sysadmin@svr:~$ sudo apt-get ugrade
E: Invalid operation ugrade
sysadmin@svr:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libc6 : Depends: libc-bin (= 2.13-20ubuntu5.1) but 2.15-0ubuntu10 is installed
 libncurses5 : Depends: libtinfo5 (= 5.9-1ubuntu5) but 5.9-4 is installed
 libnih-dbus1 : Depends: libnih1 (= 1.0.3-4ubuntu9) but 1.0.3-4ubuntu2 is installed
E: Unmet dependencies. Try using -f.
sysadmin@svr:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libswscale0 libavutil50 python-support g++-4.5 libboost-program-options1.42.0 librpmio1 libpostproc51 libavformat52 libstdc++6-4.5-dev libavfilter1 libavcodec52
  libboost-filesystem1.42.0 libboost-system1.42.0 libavdevice52
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libc-dev-bin libc6 libc6-dev libncurses5 libnih1
Suggested packages:
  glibc-doc
The following packages will be upgraded:
  libc-dev-bin libc6 libc6-dev libncurses5 libnih1
5 upgraded, 0 newly installed, 0 to remove and 335 not upgraded.
2 not fully installed or removed.
Need to get 0 B/9099 kB of archives.
After this operation, 1618 kB disk space will be freed.
Do you want to continue [Y/n]? 
locale: /lib/i386-linux-gnu/libc.so.6: version `GLIBC_2.15' not found (required by locale)
Preconfiguring packages ...
Setting up libc-bin (2.15-0ubuntu10) ...
(Reading database ... 31190 files and directories currently installed.)
Preparing to replace libc6-dev 2.13-20ubuntu5.1 (using .../libc6-dev_2.15-0ubuntu10_i386.deb) ...
Unpacking replacement libc6-dev ...
Preparing to replace libc-dev-bin 2.13-20ubuntu5.1 (using .../libc-dev-bin_2.15-0ubuntu10_i386.deb) ...
Unpacking replacement libc-dev-bin ...
Preparing to replace libc6 2.13-20ubuntu5.1 (using .../libc6_2.15-0ubuntu10_i386.deb) ...
locale: /lib/i386-linux-gnu/libc.so.6: version `GLIBC_2.15' not found (required by locale)
Checking for services that may need to be restarted...
Checking init scripts...
runlevel:/var/run/utmp: No such file or directory
Checking for services that may need to be restarted...
Checking init scripts...
runlevel:/var/run/utmp: No such file or directory
WARNING: init script for samba not found.
Stopping some services possibly affected by the upgrade (will be restarted later):
  cron: stopping...done.

WARNING: this version of the GNU libc requires kernel version
2.6.24 or later. Please upgrade your kernel before installing
glibc.

The installation of a 2.6 kernel _could_ ask you to install a new libc
first, this is NOT a bug, and should *NOT* be reported. In that case,
please add lenny sources to your /etc/apt/sources.list and run:
  apt-get install -t lenny linux-image-2.6
Then reboot into this new kernel, and proceed with your upgrade
dpkg: error processing /var/cache/apt/archives/libc6_2.15-0ubuntu10_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Processing triggers for man-db ...
locale: /lib/i386-linux-gnu/libc.so.6: version `GLIBC_2.15' not found (required by locale)
Errors were encountered while processing:
 /var/cache/apt/archives/libc6_2.15-0ubuntu10_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sysadmin@svr:~$ 


Decidí esperar un momento hasta que actualice, esperando que el problema se resuelva sin más esfuerzo. Ya he tenido que reinstalar el sistema un par de veces. Sospecho que la respuesta principal podría ser la clave del problema, pero aún no lo he probado. Lo marcaré una vez verificado, lo cual me esforzaré por hacer pronto.
Billy Moon

Gracias Billy. ¡Comenta la respuesta si tienes más preguntas / problemas!
ish

Respuestas:


11

Primero la explicación, luego una solución :)

Esto sucede porque es casi seguro que su host ejecuta OpenVZ en un kernel 2.6.18 (todos los contenedores de OpenVZ comparten el kernel del host). La razón puede variar desde la estabilidad hasta la simple pereza. El problema es que la libc 2.15 incluida con Precise requiere un núcleo mínimo 2.6.24 para funcionar. A veces, esto hará que la actualización de la versión falle, pero es posible completarla y entrar en una situación de actualización parcial aquí o aquí como usted.

Sin embargo, no temas, el requisito de libc es una opción de tiempo de compilación, y se puede configurar más bajo (en cuyo caso la biblioteca incluye soluciones para núcleos más antiguos). Supongo que establecer el mínimo en .24 es una forma de arrastrar a la gente al 2012 :)

He configurado un PPA que contiene una biblioteca recompilada que funcionará en 2.6.18 o más reciente (¡por favor verifique uname -r!), Y debería anular la biblioteca actual proporcionada por Precise. Simplemente agregue ppa: izx / ovz-libc , update, y debería dejarlo pasar. Específicamente, algo como esto:

apt-add-repository ppa:izx/ovz-libc
apt-get update
apt-get -f install
do-release-upgrade

y continúe hasta que la actualización se complete con éxito. Recomiendo NO reemplazar ningún archivo de configuración modificado o inexistente.

Mantendré el ppa actualizado a medida que libc se actualice en sentido ascendente. Si desea evitar un error similar cuando eso sucede, es posible que desee fijar libc-binmi PPA con alta prioridad, por lo que no se actualizará hasta que la versión "fija" esté disponible desde el PPA.

Espero que esto ayude, y publique aquí si alguien tiene alguna pregunta u otro comentario.


¿Podría explicar cómo pudo hacer este cambio? He intentado hurgar en la fuente libc6, pero no puedo encontrarlo. Estoy atascado en un estado semi-actualizado en un OpenVZ VPS que ejecuta 2.6.18, pero los paquetes requieren libc6 2.17, no 2.15. Cualquier ayuda sería muy apreciada.
red_sky

3

Prueba este comando. Puede abrir una terminal con Alt+ Ctrl+ T:

sudo apt-get -o APT::Immediate-Configure=0 -f install

Después de que puedas hacer un sudo apt-get upgrade.

He tenido el mismo problema ... usando el servidor Ubuntu ... extraño, ¿no?
Espero que funcione para ti.


1

Para todos los que están atrapados en la actualización do-dist y no pueden ejecutar

apt-add-repository ppa:izx/ovz-libc

Simplemente agregue la siguiente línea manualmente a /etc/apt/sources.list:

deb http://ppa.launchpad.net/izx/ovz-libc/ubuntu lucid main

Esto no funciona para mí con los contenedores Virtuzzo. Yo uso una plantilla de 10.04 y falla. Pero desde Debian 6.0 con un núcleo más actualizado, funciona para Virtuozzo 4.6
shakaran

0

No sé si existe otra forma, pero tenía archivos importantes en mi escritorio que no hice una copia de seguridad cuando Ubuntu se estrelló contra mí de esa manera exacta, resultó que tenía a mano la instalación de opción múltiple de arranque de Ubuntu 11.10 CD, así que reinicié con el CD y luego elegí "Actualizar de 12.04 LTS a 11.10" y después de cuánto tiempo pasó reinstalando 11.10, finalmente estoy funcionando nuevamente con mis archivos importantes intactos.

Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.