Archive for julio 2013

h1

Error Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.0.0-32-server.postinst line 1010.

28/07/2013

Si al actualizar un kernel ocurre este error:

carlos@test:~/ apt-get upgrade
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
0 actualizados, 0 se instalarán, 0 para eliminar y 0 no actualizados.
1 no instalados del todo o eliminados.
Se utilizarán 0B de espacio de disco adicional después de esta operación.
¿Desea continuar [S/n]? S
Configurando linux-image-3.0.0-32-server (3.0.0-32.51~lucid1) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-3.0.0-32-server
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.0.0-32-server
Found initrd image: /boot/initrd.img-3.0.0-32-server
Found memtest86+ image: /boot/memtest86+.bin
done
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 3.0.0-32-server /boot/vmlinuz-3.0.0-32-server
run-parts: /etc/kernel/postinst.d/dkms exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.0.0-32-server.postinst line 1010.
dpkg: error al procesar linux-image-3.0.0-32-server (--configure):
el subproceso instalado el script post-installation devolvió el código de salida de error 2
Se encontraron errores al procesar:
linux-image-3.0.0-32-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

El estado inestable del gestor de paquetes de Debian/Ubuntu se puede solucionar borrando los scripts de instalación:

carlos@test:~/ sudo rm -f /var/lib/dpkg/info/linux-image-3.0.0-32-server.post*
carlos@test:~/ sudo rm -f /var/lib/dpkg/info/linux-image-3.0.0-32-server.pre*
carlos@test:~/ sudo apt-get -f install

h1

error: linux/limits.h: No such file or directory

28/07/2013

Compilando Squid3 para añadir por ejemplo soporte https puede ocurrir el siguiente error:

checking how to recognize dependent libraries... pass_all
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make: *** [config.status] Error 1

La solución más habitual suele ser reinstalar los compiladores gcc y g++. No obstante, viendo el fichero config.log se puede encontrar una situación parecida a:
/usr/include/bits/local_lim.h:39:26: error: linux/limits.h: No such file or directory

La solución a este problema es instalar los kernel headers correspondientes a la versión de kernel en uso:

carlos@test:~$ uname -a
Linux test 3.5.0-36-generic #57~precise1-Ubuntu SMP Thu Jun 20 18:21:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
carlos@test:~$ apt-get install linux-headers-3.5.0-36-generic

Además, es conveniente asegurarse que el path /usr/include/linux apunta a la versión de los headers del kernel en uso:

carlos@test:~$ cd /usr/include/linux
carlos@test:~$ ln -s /usr/src/linux-headers-3.5.0-35-generic/include/linux linux

h1

error compilando Squid3 con soporte SSL: variable or field ‘X509_free_cpp’ declared void

28/07/2013

Si al compilar Squid3 ocurre el siguiente error:

Making all in base
make[4]: se ingresa al directorio «/root/squid/squid3-3.1.19/src/base»
/bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I../.. -I../../include -I../../src -I../../include -I/usr/include -I/usr/include/libxml2 -D_FORTIFY_SOURCE=2 -I/usr/include/libxml2 -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Werror -fhuge-objects -D_REENTRANT -m64 -g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -c -o AsyncCall.lo AsyncCall.cc
libtool: compile: g++ -DHAVE_CONFIG_H -I../.. -I../../include -I../../src -I../../include -I/usr/include -I/usr/include/libxml2 -D_FORTIFY_SOURCE=2 -I/usr/include/libxml2 -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Werror -fhuge-objects -D_REENTRANT -m64 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -c AsyncCall.cc -fPIC -DPIC -o .libs/AsyncCall.o
g++: warning: switch '-fhuge-objects' is no longer supported
In file included from ../../src/ssl_support.h:39:0,
from ../../src/squid.h:272,
from AsyncCall.cc:5:
../../src/ssl/gadgets.h:39:1: error: variable or field 'X509_free_cpp' declared void
../../src/ssl/gadgets.h:39:1: error: 'X509' was not declared in this scope
../../src/ssl/gadgets.h:39:1: error: 'a' was not declared in this scope
../../src/ssl/gadgets.h:40:21: error: 'X509' was not declared in this scope
../../src/ssl/gadgets.h:40:27: error: 'X509_free_cpp' was not declared in this scope
../../src/ssl/gadgets.h:40:40: error: template argument 1 is invalid
../../src/ssl/gadgets.h:40:40: error: template argument 2 is invalid
../../src/ssl/gadgets.h:40:54: error: invalid type in declaration before ';' token

Se soluciona instalando las librerías de desarrollo de SSL:

carlos@test:~$ sudo apt-get install libssl-dev