我尝试使用php-java-bridge-j2ee-selinux
从源代码安装apt-get
,但失败了。现在,无论我想使用 删除或安装什么apt-get
,它都会出现错误:
E: The package php-java-bridge-j2ee-selinux needs to be
reinstalled, but I can't find an archive for it.
我怎样才能摆脱它?
编辑2
同样的问题:
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
当我删除某些东西时:
$ 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.
我安装了 Tomcat7。下面是$ 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)
编辑1
我运行如下,出现同样的错误:
$ 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.
答案1
尝试:sudo dpkg --remove --force-all php-java-bridge-j2ee-selinux
答案2
尝试以下命令:
sudo apt-get purge php-java-bridge-j2ee-selinux
sudo apt-get update
现在一切恢复正常。
要安装 php-java-bridge-j2ee-selinux,您可以通过单击下载二进制(.deb)文件这。
现在安装打开你的终端:
sudo dpkg -i ~/Downloads/php-java-bridge-j2ee-selinux*.deb
答案3
invoke-rc.d: unknown initscript, /etc/init.d/tomcat5.5 not found.
这意味着你没有安装 tomcat:
sudo apt-get install tomcat
这将允许安装该软件包。您还必须检查:
/var/lib/dpkg/tmp.ci/postrm: 39: /var/lib/dpkg/tmp.ci/postrm: semodule: not found
这告诉您它找不到selinux
应该预先安装的模块:
sudo apt-get install policycoreutils
然后您可以照常删除该包。