Error de instalación: apt-get no funciona

Error de instalación: apt-get no funciona

Intenté instalar php-java-bridge-j2ee-selinuxdesde la fuente usando apt-getpero falló. Ahora, lo que quiera eliminar o instalar usando apt-get, me da el error:

E: The package php-java-bridge-j2ee-selinux needs to be 
reinstalled, but I can't find an archive for it.

¿Como me deshago de esto?

EDITAR 2

Mismo problema:

sudo dpkg -i ~/Downloads/php-java-bridge-j2ee-selinux*.deb
(Reading database ... 180639 files and directories currently installed.)
Preparing to replace php-java-bridge-j2ee-selinux 6.1.2.1-1 (using .../php-java-bridge-j2ee-selinux_6.1.1-2_all.deb) ...
invoke-rc.d: unknown initscript, /etc/init.d/tomcat5.5 not found.
dpkg: error processing /home/aceph/Downloads/php-java-bridge-j2ee-selinux_6.1.1-2_all.deb (--install):
 subprocess new pre-installation script returned error exit status 100
/var/lib/dpkg/tmp.ci/postrm: 39: /var/lib/dpkg/tmp.ci/postrm: semodule: not found
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 127
Errors were encountered while processing:
 /home/aceph/Downloads/php-java-bridge-j2ee-selinux_6.1.1-2_all.deb

Cuando elimino algo:

$ sudo apt-get remove docky
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package php-java-bridge-j2ee-selinux needs to be reinstalled, but I can't find an archive for it.

Tengo instalado Tomcat7. Aquí está$ java -version

$ java -version
java version "1.7.0_51"
OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-0ubuntu0.13.10.1)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

EDITAR 1

Ejecuto lo siguiente, el mismo error:

$ sudo apt-get remove --purge php-java-bridge-j2ee-selinux
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package php-java-bridge-j2ee-selinux needs
to be reinstalled, but I can't find an archive for it.

Respuesta1

Intentar:sudo dpkg --remove --force-all php-java-bridge-j2ee-selinux

Respuesta2

Pruebe los siguientes comandos:

sudo apt-get purge php-java-bridge-j2ee-selinux
sudo apt-get update

Ahora todo sigue normal.

Para instalar php-java-bridge-j2ee-selinux, puede descargar el archivo binario (.deb) haciendo cliceste.

Ahora para instalar abre tu terminal:

sudo dpkg -i ~/Downloads/php-java-bridge-j2ee-selinux*.deb

Respuesta3

invoke-rc.d: unknown initscript, /etc/init.d/tomcat5.5 not found.

Esto significa que no tienes Tomcat instalado:

sudo apt-get install tomcat

Esto permitirá la instalación del paquete. También tienes que comprobar:

/var/lib/dpkg/tmp.ci/postrm: 39: /var/lib/dpkg/tmp.ci/postrm: semodule: not found

Esto le indica que no puede encontrar el selinuxmódulo, que se supone que debe estar instalado de antemano:

sudo apt-get install policycoreutils

Luego podrás retirar el paquete como de costumbre.

información relacionada