Foro de elhacker.net

Sistemas Operativos => GNU/Linux => Mensaje iniciado por: Stakewinner00 en 15 Diciembre 2012, 14:59 pm



Título: Problema al instalar/desinstalar paquetes.
Publicado por: Stakewinner00 en 15 Diciembre 2012, 14:59 pm
Tengo un problema que me tiene harto, e estado buscando info sobre como arreglarlo y nada a servido

Me instale el virtualbox-4.2 y me salia broken package, con el synaptic le puse reparar los paquetes rotos y me salio lo siguiente 
Código:
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

si pongo el comando
Citar
sudo apt-get remove --purge virtualbox-4.2

me sale
Código:
dpkg: error processing virtualbox-4.2 (--remove):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 virtualbox-4.2
E: Sub-process /usr/bin/dpkg returned an error code (1)

tambien prove
Código:
sudo apt-get update && sudo apt-get upgrade
y el resultado fue este

Citar
Fetched 2,479B in 2s (888B/s)
Reading package lists... Done
W: GPG error: http://repository.spotify.com stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 082CCEDF94558F59
W: GPG error: http://download.virtualbox.org precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
W: GPG error: http://download.virtualbox.org oneiric Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
W: GPG error: http://download.virtualbox.org natty Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
W: GPG error: http://download.virtualbox.org maverick Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
W: GPG error: http://download.virtualbox.org lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
W: GPG error: http://download.virtualbox.org karmic Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
W: GPG error: http://download.virtualbox.org hardy Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
W: GPG error: http://download.virtualbox.org wheezy Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
W: GPG error: http://download.virtualbox.org squeeze Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
W: GPG error: http://download.virtualbox.org lenny Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 54422A4B98AB5139
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:
E: Unmet dependencies. Try using -f.

Alguna idea de como solucionarlo?

Gracias


Título: Re: Problema al instalar/desinstalar paquetes.
Publicado por: -- KiLiaN -- en 15 Diciembre 2012, 15:28 pm
Prueba a reinstalar virtualbox y a eliminarlo de nuevo.


Título: Re: Problema al instalar/desinstalar paquetes.
Publicado por: Stakewinner00 en 15 Diciembre 2012, 19:11 pm
Prueba a reinstalar virtualbox y a eliminarlo de nuevo.

lo intente desinstalar con el comando

Código:
apt-get remove virtualbox-4.2

pero me da un error y me sale lo siguiente

Citar
Do you want to continue [Y/n]? Y
dpkg: error processing virtualbox-4.2 (--remove):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 virtualbox-4.2
E: Sub-process /usr/bin/dpkg returned an error code (1)

sabes alguna otra forma de reinstalarlo?


Gracias


Título: Re: Problema al instalar/desinstalar paquetes.
Publicado por: portaro en 16 Diciembre 2012, 00:16 am
lee atentamente a ver si te puede ayudar, tambien me ha surgido la idea de interntar una force -
http://ubuntuforums.org/showthread.php?t=1608698 (http://ubuntuforums.org/showthread.php?t=1608698) te puede quebrantear la distro hazlo en ultimo caso.
sudo dpkg --force-all --purge  nombre


Título: Re: Problema al instalar/desinstalar paquetes.
Publicado por: -- KiLiaN -- en 16 Diciembre 2012, 10:54 am
Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.


Citar
El paquete está en un estado muy malo e inconsistente - debe
  reinstalarlo antes de intentar una extracción.

Por eso te he dicho reinstalalo haciendo un apt-get install virtualbox-4.2 y luego cuando esté instalado lo desistalas haciendo apt-get remove.


Título: Re: Problema al instalar/desinstalar paquetes.
Publicado por: Stakewinner00 en 16 Diciembre 2012, 11:15 am
probando con lo del apt-get install virtualbox-4.2 me sale

Citar
root@bt:~#  apt-get install virtualbox-4.2
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:
  virtualbox-4.2: Depends: libc6 (>= 2.15) but 2.11.1-0ubuntu7.12 is to be installed
                  Depends: libpython2.7 (>= 2.7) but it is not installable
                  Depends: libqt4-opengl (>= 4:4.7.2) but 4:4.7.0-0ubuntu2~lucid1~ppa2 is to be installed
                  Depends: libqtcore4 (>= 4:4.8.0) but 4:4.7.0-0ubuntu2~lucid1~ppa2 is to be installed
                  Depends: libqtgui4 (>= 4:4.8.0) but 4:4.7.0-0ubuntu2~lucid1~ppa2 is to be installed
                  Depends: libssl1.0.0 (>= 1.0.0) but it is not installable
                  Depends: libstdc++6 (>= 4.6) but 4.4.3-4ubuntu5.1 is to be installed

Y cuando intento instalar alguno de esos paquetes me pone que primero debo reparar los paquetes rotos.  No puedo instalar virtual box, no puedo borrarlo y no puedo descargar ningún paquete hasta k no arregle este paquete roto y ya no se k más probar.

Se puede borrar manualmente?


Título: Re: Problema al instalar/desinstalar paquetes.
Publicado por: -- KiLiaN -- en 16 Diciembre 2012, 11:23 am
Prueba con:

Citar
1) Forzamos
sudo dpkg --purge --force-remove-reinstreq

y si aun asi, no funciona, entonces probaríamos:
a.- Ejecutamos
dpkg --listfiles

y buscamos cada fichero que se instalo, de los que dan problemas, para a continuación buscarlos y eliminarlos.
b.- Editar el archivo:
sudo nano /var/lib/dpkg/status

Eliminar la sección del paquete seriamente dañado. Hacer una copia de seguridad antes de editar el archivo:
cp /directorio/archivo /home/tu_usuario/copias_archivos

c.- Editar el archivo:
sudo nano /var/lib/dpkg/available

Eliminar la sección del paquete seriamente dañado. Hacer una copia de seguridad antes de editar el archivo.
Recordad que, usar diferentes fuentes de repositorios a veces, puede causarnos problemas de este tipo y que lo mas recomendable es siempre usar fuentes oficiales para evitarnos estos problemas.
Fuente: un post de taringa xD

Puedes buscarlo manualmente en el synaptics y borrarlo.


Título: Re: Problema al instalar/desinstalar paquetes.
Publicado por: Stakewinner00 en 16 Diciembre 2012, 13:17 pm
Thank's a lot.

Porfin lo arregle, tuve que borrar el virtual box de /var/lib/dpkg/status y despues arreglar la carpeta info /var/lib/dpkg

Probe de instalar un paquete cualquiera y ya funciona.