
我嘗試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
然後您可以照常刪除該包。